Skip to content

Instantly share code, notes, and snippets.

@s4parke
Created February 27, 2013 22:10
Show Gist options
  • Save s4parke/5052277 to your computer and use it in GitHub Desktop.
Save s4parke/5052277 to your computer and use it in GitHub Desktop.
Install sysbench and run some cpu and mysql benchmarks.
wget http://garr.dl.sourceforge.net/sourceforge/sysbench/sysbench-0.4.12.tar.gz
cd sysbench-0.4.12
libtoolize --force --copy
./autogen.sh
./configure
make
sudo make install
mysql -u root -e "create database sbtest;"
sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=500000 --mysql-user=root --mysql-socket=/var/lib/mysql/mysql.sock prepare
sysbench --num-threads=16 --max-requests=100000 --test=oltp --oltp-table-size=500000 --mysql-socket=/var/lib/mysql/mysql.sock --oltp-read-only --mysql-user=root run
sysbench --num-threads=16 --max-requests=10000 --test=oltp --oltp-table-size=500000 --mysql-socket=/var/lib/mysql/mysql.sock --oltp-test-mode=complex --mysql-user=root run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment