Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1842414
  • 博文数量: 117
  • 博客积分: 2559
  • 博客等级: 少校
  • 技术积分: 4385
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-13 20:08
个人简介

作为初学者,要想取得进步,成为高手,首先应该了解自己的不足之处.

文章分类

全部博文(117)

文章存档

2014年(1)

2013年(25)

2012年(13)

2011年(77)

2010年(1)

分类: Mysql/postgreSQL

2011-09-23 16:50:38

 

安装文档

 

wget ''

 

yum install libtool

(libtool里面包含autoconf,automake)

configure的时候,includes目录和lib目录,mysql官方版和percona版会不一样,请按实际情况修改


 

tar zxvf sysbench-0.4.12.tar.gz

cd sysbench-0.4.12

./autogen.sh

./configure --with-mysql --with-mysql-includes=/home/q/mysql_3306/include/mysql --with-mysql-libs=/home/q/mysql_3306/lib/mysql

make

make install

 

使用问题

[root@l-hoteldb1.h.cn2 /tmp]# sysbench

sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

[root@l-hoteldb1.h.cn2 /tmp]# ln -s /home/q/mysql_3306/lib/libmysqlclient.so.18 /usr/lib64/


一,fileio

Usage example:

 

$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw prepare
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw run
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw cleanup


二,oltp

Example usage:

$ sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock --mysql-db=test prepare
$ sysbench --num-threads=16 --max-requests=100000 --test=oltp --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock --oltp-read-only run

$ sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock --mysql-db=test cleanup


阅读(10107) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~