数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

对MYSQL进行压力测试


发布日期:2021年08月26日
 
对MYSQL进行压力测试

安装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

Oracle Support…… 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次查询每秒执行 条数据

               

上一篇:开启SQL Server 2008 R2数据管理新纪元

下一篇:MySQL数据库新特性之存储过程入门教程