Skip to content

Instantly share code, notes, and snippets.

$ for i in {1..4}; do mysql -e "alter table sbtest$i row_format=compressed key_block_size=8;" -D sbtest_zip; done
$ for i in {1..1000}; do mysql -e 'show engine innodb status\G' | sed -n '/SEMAPHORES/,/Spin rounds per wait/p'; sleep 1; done | tee sbtest_zip.txt
$ for i in 1 2 3; do ./sysbench --test=${SYSBENCH_DIR}/tests/db/oltp.lua --db-driver=mysql --oltp-tables-count=4 --oltp-table-size=4000000 --num-threads=100 --mysql-db=sbtest_zip --mysql-socket=/tmp/mysql.sock run --max-time=300 --max-requests=0; done
$ egrep 'Last time.*locked' sbtest_zip.txt | sort | uniq -c
1 Last time read locked in file btr0cur.cc line 3592
1 Last time read locked in file btr0cur.cc line 3702
3 Last time read locked in file btr0cur.cc line 3720
78459 Last time read locked in file btr0cur.cc line 545
27 Last time read locked in file btr0cur.cc line 822
2 Last time read locked in file btr0sea.cc line 1094
1 Last time read locked in file btr0sea.cc line 1331
18 Last time read locked in file btr0sea.cc line 907
2 Last time read locked in file buf0flu.cc line 1056