June 18, 2013

Post: Ultimate MySQL variable and status reference list

… referring to the amazing MySQL manual, especially the option and variable reference table. …_loopsblogpercona.commanual innodb_table_locksblogpercona.commanual innodb_thread_concurrencyblogpercona.commanual innodb_thread_sleep_delayblogpercona.commanual Innodb_truncated_status_writesblogpercona…

Post: How to debug long-running transactions in MySQL

… query the tables, and if something is blocked, find its thread ID. Match this up with the ID in SHOW PROCESSLIST…_id INNER JOIN information_schema.processlist p on b.trx_mysql_thread_id = p.ID LIMIT 1′) if [ "${host}" ]; then echo “Host…/`date +%s`-tcpdump & mysql -e ‘show innodb status\Gshow full processlist’ > /root/tcpdumps/`date +%s`-innodbstatus pid=$! sleep 30 kill ${pid} fi If this…

Post: Troubleshooting MySQL Memory Usage

… ps.log sleep 60 done Check for Table Cache Related Allocations There are cases when MySQL … if you close connection MySQL can clean them up. Killing connections (or stopping related …(318747272 + 128560) Recovery system 0 (0 + 0) Threads 425080 (406936 + 18144) Dictionary memory allocated …

Post: Living with backups

…= 1; while(1) { if ($is_running == 0 && $was_running == 1) { kill 19, $pid; $was_running= 0; } if ($is_running == 1 && $was_running == 0) { kill 18, $pid; $was_running= 1; } … my $sth= $dbh->prepare(‘SHOW GLOBAL STATUS LIKE “Threads_connected”‘); … if…) { last; } sleep(1); } What this script does is to check MySQL status every second and in case the number of connected threads goes…

Comment: MySQL Server Memory Usage

…0′ ‘Com_insert’, ’17889656′ ‘Com_insert_select’, ’11′ ‘Com_kill‘, ’47′ ‘Com_load’, ’0′ ‘Com_load_master_data’, ‘….79, 1.00, 0.95 328 processes: 326 sleeping, 2 running, 0 zombie, 0 stopped CPU states…from 32M according to MySQL innodb_additional_mem_pool_size=20M innodb_file_io_threads=4 innodb_lock_…