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