10
Updated: October 22nd, 2011
sysbench – Linux test bench. Easy as pie to test CPU, memory, threads, mysql, and disk performance.
Full description is available here: http://sysbench.sourceforge.net/docs/
install mysql, mysql-devel wget http://downloads.sourceforge.net/project/sysbench/sysbench/0.4.12/sysbench-0.4.12.tar.gz tar xvzf sysbench*gz cd sysbench* ./configure && make install |
mysql tests
This will run 10 separate consecutive mysql tests using an InnoDB table type, each with 100 mysql threads, doing a total of 1000 various SQL operations per test. Then it will print the total time they took to finish:
sysbench --test=oltp --mysql-user=USER --mysql-password=PASS --mysql-db=test \ --mysql-host='HOST' --mysql-table-engine=innodb prepare time perl -e "foreach(1..10){print \`sysbench --max-requests=1000 --test=oltp \ --mysql-user=USER --mysql-password=PASS --mysql-db=test --mysql-host='HOST' \ --mysql-table-engine=innodb --num-threads=100 run\`}" sysbench --test=oltp --mysql-user=USER --mysql-password=PASS --mysql-db=test \ --mysql-host='HOST' cleanup |
In the meantime, if you found this article useful, feel free to buy me a cup of coffee below.