Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
How to install sysbench 0.5 on Debian 7
+2 Vote Up -0 Vote Down

Normally, sysbench 0.4.12 version can be installed from repositories like “apt-get install sysbench” but the newer version 0.5 is not added in any repo yet (AFAIK) so, it’s bit difficult to install it.

1. Install bzr package if it’s not installed. (i.e apt-get install bzr)

2. Download the code from branch. (i.e bzr branch lp:sysbench)  https://code.launchpad.net/~sysbench-developers/sysbench/0.5

root@deb-pxc56-2:~# bzr branch lp:sysbench
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
Branched 122 revisions. 
root@deb-pxc56-2:~#

3. Before you compile code from the branch, you need some of the packages to be installed If they are not.

apt-get install automake
apt-get install libtool
apt-get install libmysqlclient-dev
apt-get install libssl1.0.0 libssl-dev

4. Go to sysbench dir and run autogen.sh script.

root@deb-pxc56-1:~# cd /root/sysbench/
root@deb-pxc56-1:~/sysbench# 
root@deb-pxc56-2:~/sysbench# ./autogen.sh
./autogen.sh: running `aclocal -I m4' 
...
Libtoolized with: libtoolize (GNU libtool) 2.4.2
Automade with: automake (GNU automake) 1.11.6
Configured with: autoconf (GNU Autoconf) 2.69
root@deb-pxc56-2:~/sysbench#

5. Run ./configure

root@deb-pxc56-2:~/sysbench# ./configure 
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
...
config.status: creating sysbench/scripting/lua/src/Makefile
config.status: creating config/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
root@deb-pxc56-2:~/sysbench#

6. Run make

root@deb-pxc56-2:~/sysbench# make
Making all in doc
make[1]: Entering directory `/root/sysbench/doc'
Making all in xsl
...
make[2]: Leaving directory `/root/sysbench/sysbench'
make[1]: Leaving directory `/root/sysbench/sysbench'
make[1]: Entering directory `/root/sysbench'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/root/sysbench'
root@deb-pxc56-2:~/sysbench#

Now you can run sysbench 0.5 from the installation dir.

root@deb-pxc56-1:~# cd /root/sysbench/sysbench/
root@deb-pxc56-1:~/sysbench/sysbench# 
root@deb-pxc56-2:~/sysbench/sysbench# ./sysbench 
--test=/root/sysbench/sysbench/tests/db/oltp.lua 
--oltp-table-size=100000 --mysql-db=sbtest --mysql-user=root 
--mysql-password=root prepare
sysbench 0.5:  multi-threaded system evaluation benchmark

Creating table 'sbtest1'...
Inserting 100000 records into 'sbtest1'
root@deb-pxc56-2:~/sysbench/sysbench# 

root@deb-pxc56-2:~/sysbench/sysbench# ./sysbench 
--test=/root/sysbench/sysbench/tests/db/oltp.lua 
--oltp-table-size=100000 --oltp-tables-count=1 --num-threads=32 
--mysql-host=127.0.0.1 --mysql-user=root --mysql-password=root 
--mysql-port=3306 --report-interval=1 --max-requests=0 --max-time=0 run
WARNING: Both max-requests and max-time are 0, running endless test
sysbench 0.5:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 32
Report intermediate results every 1 second(s)
Random number generator seed is 0 and will be ignored

Threads started!

[   1s] threads: 32, tps: 0.00, reads/s: 0.00, writes/s: 23.33, 
response time: 971.94ms (95%)
[   2s] threads: 32, tps: 0.00, reads/s: 0.00, writes/s: 26.00, 
response time: 1271.31ms (95%)
[   3s] threads: 32, tps: 0.00, reads/s: 0.00, writes/s: 25.99, 
response time: 1219.13ms (95%)
....

Votes:

You must be logged in with a MySQL account to vote on Planet MySQL entries. More information on PlanetMySQL voting.

Planet MySQL © 1995, 2016, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.