上一篇: mutt 发送邮件命令
MySQL 压力测试工具super smack
[ 2010/11/01 14:30 | by selboo ]
1. 源:http://vegan.net/tony/supersmack/
2. 安装:
./configure
make
make install
3. 测试:
[root@Mail smacks]# super-smack -d mysql select-key.smack 10 10000
Error running query select count(*) from http_auth:Table 'test.http_auth' doesn't exist
Creating table 'http_auth'
Populating data file '/var/smack-data/words.dat' with shell command 'gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d'
Loading data from file '/var/smack-data/words.dat' into table 'http_auth'
Table http_auth is now ready for the test
Query Barrel Report for client smacker1
connect: max=420ms min=5ms avg= 49ms from 10 clients
Query_type num_queries max_time min_time q_per_s
select_index 200000 0 0 16850.30
[root@Mail smacks]# super-smack -d mysql update-select.smack 10 10000
Query Barrel Report for client smacker
connect: max=7ms min=0ms avg= 3ms from 10 clients
Query_type num_queries max_time min_time q_per_s
select_index 100000 1 0 5113.27
update_index 100000 0 0 5113.27
在以上测试结果中,
* 10代表10个客户端同时接入,1000代表每个客户端的查询次数(脚本中,对查询次数做了翻倍处理)
* max、min、avg为客户端最大、最小、平均连接时间
* num_queries、max_time、min_time为总请求次数,最大、最小查询时间(以毫秒为单位)
* q_per_s为每秒处理的请求数