Skip to content

Instantly share code, notes, and snippets.

@dotmanila
dotmanila / percona.live.notes.md
Created September 17, 2011 13:56 — forked from eklitzke/percona.live.notes.md
percona live notes

Percona Server with XtraDB

Introduction

  • 2010 InnoDB 5.1 announced, will first ship with MySQL 5.5.
  • Historically InnoDB development lags while MySQL is trying to GA
  • lots of things fixed in InnoDB since MySQL 5.0
  • important note -- plugin version of InnoDB is not the default in 5.1
@dotmanila
dotmanila / rtime.init
Created October 7, 2011 01:45
rtime init script
#!/bin/sh
# rtime daemon start/stop script.
# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 64 36
# description: Passive TCP response time analysis tool.
# Comments to support LSB init script conventions
### BEGIN INIT INFO
@dotmanila
dotmanila / sysbench-sas-raid1-60g-fileio.out
Created October 10, 2011 03:30
SAS RAID1 sysbench 60G fileio All Modes
# Percona Toolkit System Summary Report ######################
Date | 2011-09-07 22:26:20 UTC (local TZ: EDT -0400)
Hostname | zoooe.dotmanila.com
Uptime | 34 days, 18:27, 1 user, load average: 0.04, 0.06, 0.07
System | Dell Inc.; PowerEdge R210; vNot Specified (<OUT OF SPEC>)
Service Tag | 2K408P1
Platform | Linux
Release | CentOS release 5.6 (Final)
Kernel | 2.6.18-194.32.1.el5
Architecture | CPU = 64-bit, OS = 64-bit
@dotmanila
dotmanila / hddx4-raid10-md-sysbench-fileio.out
Created October 12, 2011 11:59
4xHDD RAID10 (md) sysbench fileio All Modes
# Percona Toolkit System Summary Report ######################
Date | 2011-10-12 19:17:51 UTC (local TZ: MST -0700)
Hostname | zoe.dotmanila.com
Uptime | 3 days, 5:32, 1 user, load average: 16.00, 15.05, 11.17
System | Supermicro; X9SCL/X9SCM; v0123456789 (Desktop)
Service Tag | 0123456789
Platform | Linux
Release | CentOS release 5.7 (Final)
Kernel | 2.6.18-238.el5
Architecture | CPU = 64-bit, OS = 64-bit
@dotmanila
dotmanila / ssd-single-dev-sysbench-fileio.out
Created October 12, 2011 12:17
SSD Single Device sysbench fileio All Modes
# Percona Toolkit System Summary Report ######################
Date | 2011-10-12 19:17:51 UTC (local TZ: MST -0700)
Hostname | zoe.dotmanila.com
Uptime | 3 days, 5:32, 1 user, load average: 16.00, 15.05, 11.17
System | Supermicro; X9SCL/X9SCM; v0123456789 (Desktop)
Service Tag | 0123456789
Platform | Linux
Release | CentOS release 5.7 (Final)
Kernel | 2.6.18-238.el5
Architecture | CPU = 64-bit, OS = 64-bit
@dotmanila
dotmanila / gist:3167982
Created July 24, 2012 04:08
Monitor for SYNC_RECV and trigger netstat and wget in Windows
@echo off
:xloop
for /f "delims=" %%a in ('netstat -ant^|find /v "ESTABLISHED"^|find /v "TIME_WAIT"^|find /v /c "LISTENING"') do set c=%%a
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
for /f "tokens=1,2,3 delims=/:" %%a in ("%TIME: =0%") do (set mytime=%%a%%b%%c)
set ntfil=%mydate%_%mytime%
echo %ntfil% Found %c% connections
if %c% GTR 100 (
@dotmanila
dotmanila / gist:3719757
Created September 14, 2012 04:23
generating core files
Here are the instructions on enabling core dumps for mysql. If you are starting, stopping mysql via the regular init scripts/mysqld_safe, you should execute/implement this changes as root. Additionally, you have to make sure that you mysqld binary is not stripped. For tarball distributions, this is usually the case. However for RPM or deb packages, they are often stripped. For RPM, you simply need to install the corresponding *-debuginfo* packages.
1. su as root
shell> su -
2. Set core-file-size ulimit to unlimited
shell> ulimit -c unlimited
3. When dumping multiple cores, best to suffix them with the current mysqld pid
shell> echo "1" > /proc/sys/kernel/core_uses_pid
@dotmanila
dotmanila / monitor.sh
Last active October 11, 2015 04:57
mysql monitor
#!/bin/bash
WD=/root/monitor
USR=<mysqlrootuser>
PWD=<mysqlrootpass>
mkdir -p $WD
cd $WD
while [ 1 ]
@dotmanila
dotmanila / gist:4564647
Created January 18, 2013 13:48
An automation script to use ibdconnect to dump orphan *.ibd files for tables from a specific list (db/tbl format).
#!/bin/bash
#BSE=/data/percona/Percona-Server-5.1.66-rel14.2-501.Linux.x86_64
BSE=/data/percona/Percona-Server-5.0.92-b23.85.Linux.x86_64
MYSQLD=$BSE/libexec/mysqld
DTA=/data/percona/data
SRC=/data/mysql.RECOVERED_FROM_2013_01_13_BACKUP
TBLS=/data/percona/tables.lst
TKIT=/data/percona/percona-data-recovery-tool-for-innodb
@dotmanila
dotmanila / keepalived.conf
Last active January 3, 2016 04:59
keepalived.conf 1 writer and 1 reader VIP for Percona XtraDB Cluster
global_defs {
notification_email {
root@pxc.domain
}
notification_email_from pxc01@pxc.localdomain
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id pxc-cluster
}