全部博文(137)
分类: Mysql/postgreSQL
2010-02-22 11:43:59
./configure --prefix=/usr/local/supersmack --with-mysql --with-mysql-lib=/usr/local/mysql/lib/mysql/ --with-mysql-include=/usr/local/mysql/include/mysql/ |
[root@mysql super-smack-1.3]# make [root@mysql super-smack-1.3]# make install |
3.配置测试信息
[root@mysql bin]# cp /usr/share/smacks/select-key.smack /usr/local/supersmack/bin/ [root@mysql bin]# cp /usr/local/supersmack/bin/* /usr/bin/ |
修改select-key.smack 里面的帐号密码及测试使用的数据库。
4.开始测试
测试myiasm引擎
select-key性能
[root@mysql bin]# 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 |
再次运行测试
[root@mysql bin]# ./super-smack -d mysql select-key.smack 100 200 Query Barrel Report for client smacker1 connect: max=391ms min=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性能
[root@mysql bin]# ./super-smack -d mysql update-select.smack 100 200 Query Barrel Report for client smacker connect: max=2300ms min=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: 90000 Duplicates: 0 Warnings: 0 |
select-key [root@mysql bin]# ./super-smack -d mysql select-key.smack 100 200 update-select |