LINUX系统下MySQL 压力测试工具super smack
1. 源文件下载地址:http://vegan.net/tony/supersmack/ 2. 安装: 注意在编译时,可以先把对应的libmysqlclient.so.*拷贝到/usr/lib 3. 测试:
[root@DB_Backup smacks]# super-smack -d mysql select-key.smack 10 10000
Query Barrel Report for client smacker1
connect: max=37ms min=0ms avg= 10ms from 10 clients
Query_type num_queries max_time min_time q_per_s
select_index 200000 0 0 10148.47 [root@DB_Backup smacks]# super-smack -d mysql update-select.smack 10 1000
Query Barrel Report for client smacker
connect: max=2ms min=0ms avg= 0ms from 10 clients
Query_type num_queries max_time min_time q_per_s
select_index 10000 1 0 4038.90
update_index 10000 1 0 4038.90 在以上测试结果中, * 10代表10个客户端同时接入,1000代表每个客户端的查询次数(脚本中,对查询次数做了翻倍处理)
* max、min、avg为客户端最大、最小、平均连接时间
* num_queries、max_time、min_time为总请求次数,最大、最小查询时间(以毫秒为单位)
* q_per_s为每秒处理的请求数