Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4153281
  • 博文数量: 240
  • 博客积分: 11504
  • 博客等级: 上将
  • 技术积分: 4277
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-28 14:24
文章分类

全部博文(240)

分类: Mysql/postgreSQL

2007-12-17 10:42:12

1、安装supersmack

安装过程以及我中间遇到问题的总结都在这里。

之前记得把libmysqlclient.so.16拷贝到/usr/lib中去,这样make 的时候不用改MakeFile文件。
[root@localhost super-smack-1.3]# cp /usr/local/mysql/libmysqlclient.so.16 /usr/lib

我遇到的问题如下:
error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
看到北京野狼的这个帖子:


[root@localhost super-smack-1.2]# ./configure --with-mysql
configure: error: installation or configuration problem: C++ compiler cannot create executables.
没有安装C++编译器

[root@localhost rpmpackage]# rpm -ivh libc-client-2004g-2.2.1.i386.rpm
Preparing...                ########################################### [100%]
   1:libc-client            ########################################### [100%]
[root@localhost rpmpackage]# rpm -ivh libc-client-devel-2004g-2.2.1.i386.rpm
Preparing...                ########################################### [100%]
   1:libc-client-devel      ########################################### [100%]

[root@localhost rpmpackage]# rpm -ivh libstdc++-devel-4.1.1-52.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:libstdc++-devel        ########################################### [100%]
[root@localhost rpmpackage]# rpm -ivh gcc-c++-4.1.1-52.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:gcc-c++                ########################################### [100%]

[root@localhost rpmpackage]# cd ../sourcepackage/super-smack-1.2
[root@localhost super-smack-1.2]# ./configure --with-mysql
loading cache ./config.cache
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 ./config.cache
creating ./config.status
creating Makefile
creating src/Makefile
creating config.h


Building with the following options:

MySQL Support..................... yes
PostgreSQL Support................ no
Oracle Support.................... no

If this is not what you intended, please re-run configure.

Thanks for using super-smack!
然后make;make install
其他问题看
FAQ.php

2、进行实际测试。
拷贝示例文件。
[root@localhost super-smack-1.3]# cp -r smacks/ /usr/local/bin/
修改用户名和密码为自己的

默认是测试MYISAM表的性能。

[root@localhost smacks]# super-smack -d mysql select-key.smack 10 1000
Error running query select count(*) from http_auth:Table 'test.http_auth' doesn't exist
Creating table 'http_auth'
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=156ms  min=0ms avg= 21ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    20000   0       0       16299.96

10 是连接客户的数目,每个客户有100次轮询。
结果表示:super-smack总共执行了2W次查询,每秒执行16299.96 条数据

下来测试innodb 表
进入MYSQL的SHELL,修改表类型
mysql> alter table http_auth engine innodb;
Query OK, 90000 rows affected (15.18 sec)
Records: 90000  Duplicates: 0  Warnings: 0

[root@localhost smacks]# super-smack -d mysql select-key.smack 10 1000
Query Barrel Report for client smacker1
connect: max=117ms  min=0ms avg= 18ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    20000   0       0       16747.00
[root@localhost smacks]#
接下来测试集群的

mysql> alter table http_auth engine ndb;
Query OK, 90000 rows affected (11.14 sec)
Records: 90000  Duplicates: 0  Warnings: 0

[root@localhost smacks]# super-smack -d mysql select-key.smack 10 1000
Query Barrel Report for client smacker1
connect: max=3ms  min=0ms avg= 0ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    20000   3       1       2587.91

看一下update的。
[root@localhost smacks]# super-smack -d mysql update-select.smack 100 10000
Table 'http_auth' does not meet condtions, will be dropped
Creating table 'http_auth'
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 smacker
connect: max=752ms  min=0ms avg= 108ms from 100 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    1000000 19      0       3837.48
update_index    1000000 20      0       3837.48


这个测试结果怎么表名MYISAM表的SELECT比INNODB的还差。
具体原因我会找找看。
阅读(9296) | 评论(5) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2008-12-12 11:58:05

刚刚我查了下 , 我第mysql数据中没有myisam表, 我该怎么测试阿? 谢谢!

chinaunix网友2008-12-12 11:54:00

兄弟你好,首先谢谢你第劳动,我对mysql比较感兴趣!麻烦你帮我解决如下问题,我在测试第时候发现有问题(我的mysql已经启动了): [root@localhost smacks]# super-smack -d mysql select-key.smack 10 1000 super-smack: Could not open input file select-key.smack errno = 2, error is No such file or directory 烦劳, 你详细第解释下没部分的含义,并告诉我出错第原因了,谢谢! email: iamliuxiaojie8110@yahoo.com.cn

cserken2008-12-02 15:02:00

我用SQL-BENCH和super-smack测试mysql cluster会有很大的差别,作者知道是什么原因吗?

chinaunix网友2008-06-07 11:41:27

有什么好的mysql压力测试没? mysql自带的sql-bench呢?测试后,不会解读测试结果,也没有用呀 期待高手写个sql-bench测试详解之类的文章

chinaunix网友2008-01-08 13:46:35

兄弟,这个super-smack我用过,但后来还是决定不用了。 你可以打开log,看一下super-smack执行了什么内容。。 select_index 20000 0 0 16747.00 这个应该是不断的执行有限相同的sql造成的,实际上的硬件随机查询应该达不到这么快。 cycker at qq dot com