Home | 簡體中文 | 繁體中文 | 雜文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品與服務 | Email

第 21 章 Test - System performance benchmark

目錄

21.1. SysBench
21.2. Bandwidth: a memory bandwidth benchmark
21.3. locust - An open source load testing tool.

21.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