Home | Mirror | Search

第 19 章 Test - System performance benchmark

目錄

1. SysBench
2. Bandwidth: a memory bandwidth benchmark

1. SysBench

處理器測試

sysbench --test=cpu --cpu-max-prime=20000 run
多綫程測試
sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run
		

磁碟IO性能測試

sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw prepare
sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw run
sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw cleanup
		

內存測試

sysbench --test=memory --memory-block-size=8k --memory-total-size=4G run
		

MySQL OLTP 事務處理性能測試

sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock --mysql-user=test --mysql-host=localhost --mysql-password=test prepare
sysbench --num-threads=8 --max-requests=1000000 --test=oltp --mysql-table-engine=innodb --oltp-table-size=10000000 --mysql-socket=/tmp/mysql.sock --mysql-user=root --mysql-host=localhost --mysql-password=xxxx --mysql-db=sbtest run
		
comments powered by Disqus