pkman110 发表于 2010-02-22 11:43

super smack 压力测试软件FOR mysql安装配置

1.下载软件
http://vegan.net/tony/supersmack/

2.编译安装
./configure --prefix=/usr/local/supersmack --with-mysql --with-mysql-lib=/usr/local/mysql/lib/mysql/ --with-mysql-include=/usr/local/mysql/include/mysql/
注意红色字体代表的目录,并不是默认的mysql/lib和mysql/include
# make
# make install
3.配置测试信息
# cp /usr/share/smacks/select-key.smack /usr/local/supersmack/bin/
# cp /usr/local/supersmack/bin/* /usr/bin/
修改select-key.smack 里面的帐号密码及测试使用的数据库。
4.开始测试
测试myiasm引擎
select-key性能
# super-smack -d mysql select-key.smack 10 1000
./super-smack: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
缺少库文件,将该文件CP到系统目录下
# cp /usr/local/mysql/lib/mysql/libmysqlclient.so.16 /usr/lib
如果无法载入数据,则按以下方法处理
/usr/local/supersmack/bin/gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d>/var/smack-data/words.dat
再次运行测试
# ./super-smack -d mysql select-key.smack 100 200
Query Barrel Report for client smacker1
connect: max=391msmin=1ms avg= 51ms from 100 clients
Query_type num_queries max_time min_time q_per_s
select_index 40000 0 0 3713.30
100用户执行200次轮询,共执行40000次查询
update-select性能
# ./super-smack -d mysql update-select.smack 100 200
Query Barrel Report for client smacker
connect: max=2300msmin=1ms avg= 70ms from 100 clients
Query_type num_queries max_time min_time q_per_s
select_index 20000 18 0 1428.06
update_index 20000 20 0 1428.06
innodb测试
mysql> alter table http_auth engine=innodb;
Query OK, 90000 rows affected (1.85 sec)
Records: 90000Duplicates: 0Warnings: 0

select-key
# ./super-smack -d mysql select-key.smack 100 200
Query Barrel Report for client smacker1
connect: max=683msmin=1ms avg= 59ms from 100 clients
Query_type num_queries max_time min_time q_per_s
select_index 40000 0 0 3694.71
update-select
# ./super-smack -d mysql update-select.smack 100 200
Query Barrel Report for client smacker
connect: max=1208msmin=1ms avg= 57ms from 100 clients
Query_type num_queries max_time min_time q_per_s
select_index 20000 253 0 672.55
update_index 20000 87 0 672.55


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/111930/showart_2183752.html
页: [1]
查看完整版本: super smack 压力测试软件FOR mysql安装配置