安装supersmack
安装过程以及我中间遇到问题的总结都在这里
之前记得把libmysqlclientso拷贝到/usr/lib中去这样make 的时候不用改MakeFile文件
[root@localhost supersmack]# cp /usr/local/mysql/libmysqlclientso /usr/lib
我遇到的问题如下
error while loading shared libraries: libmysqlclientso: cannot open shared object file: No such file or directory
看到北京野狼的这个帖子
[root@localhost supersmack]# /configure withmysql
configure: error: installation or configuration problem: C++ compiler cannot create executables
没有安装C++编译器
[root@localhost rpmpackage]# rpm ivh libcclientgirpm
Preparing… ########################################### [%]
:libcclient ########################################### [%]
[root@localhost rpmpackage]# rpm ivh libcclientdevelgirpm
Preparing… ########################################### [%]
:libcclientdevel ########################################### [%]
[root@localhost rpmpackage]# rpm ivh libstdc++develelirpm
Preparing… ########################################### [%]
:libstdc++devel ########################################### [%]
[root@localhost rpmpackage]# rpm ivh gccc++elirpm
Preparing… ########################################### [%]
:gccc++ ########################################### [%]
[root@localhost rpmpackage]# cd /sourcepackage/supersmack
[root@localhost supersmack]# /configure withmysql
loading cache /configcache
checking for a BSD compatible install… /usr/bin/install c
checking whether build environment is sane… yes
checking whether make sets ${MAKE}… yes
…
updating cache /configcache
creating /configstatus
creating Makefile
creating src/Makefile
creating configh
Building with the following options:
MySQL Support…… yes
PostgreSQL Support…… no
OracleSupport…… no
If this is not what you intended please rerun configure
Thanks for using supersmack!
然后make;make install
进行实际测试
拷贝示例文件
[root@localhost supersmack]# cp r smacks/ /usr/local/bin/
修改用户名和密码为自己的
默认是测试MYISAM表的性能
[root@localhost smacks]# supersmack d mysql selectkeysmack
Error running query select count(*) from http_auth:Table testhttp_auth doesnt exist
Creating table http_auth
Loading data from file /var/smackdata/wordsdat into table http_auth
Table http_auth is now ready for the test
Query Barrel Report for client smacker
connect: max=ms min=ms avg= ms from clients
Query_type num_queries max_time min_time q_per_s
select_index
是连接客户的数目每个客户有次轮询
结果表示supersmack总共执行了W次查询每秒执行 条数据
下来测试innodb 表
进入MYSQL的SHELL修改表类型
mysql> alter table http_auth engine innodb;
Query OK rows affected ( sec)
Records: Duplicates: Warnings:
[root@localhost smacks]# supersmack d mysql selectkeysmack
Query Barrel Report for client smacker
connect: max=ms min=ms avg= ms from clients
Query_type num_queries max_time min_time q_per_s
select_index
[root@localhost smacks]#
接下来测试集群的
mysql> alter table http_auth engine ndb;
Query OK rows affected ( sec)
Records: Duplicates: Warnings:
[root@localhost smacks]# supersmack d mysql selectkeysmack
Query Barrel Report for client smacker
connect: max=ms min=ms avg= ms from clients
Query_type num_queries max_time min_time q_per_s
select_index
看一下update的
[root@localhost smacks]# supersmack d mysql updateselectsmack
Table http_auth does not meet condtions will be dropped
Creating table http_auth
Loading data from file /var/smackdata/wordsdat into table http_auth
Table http_auth is now ready for the test
Query Barrel Report for client smacker
connect: max=ms min=ms avg= ms from clients
Query_type num_queries max_time min_time q_per_s
select_index
update_index
这个测试结果怎么表名MYISAM表的SELECT比INNODB的还差