Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | Github | OSChina 博客 | 云社区 | 云栖社区 | Facebook | Linkedin | 知乎专栏 | 视频教程 | About

第 24 章 Test - System performance benchmark

目录

24.1. SysBench
24.2. Bandwidth: a memory bandwidth benchmark
24.3. locust - An open source load testing tool.

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