[MySQL]: SysBench Installation procedure
SysBench: System evaluation benchmark
Why ?
The idea is to quickly get an impression about system performance for MySQL usage without setting up complex benchmark and even without installing MySQL.
In some cases this is very helpful. This is also the reason for having everything in simple file not depending on any external libraries.
Sequential read/writes test is a bit tricky, it means request are just given out sequentially, but there is no guaranty they will be actually executed this way, it could result in some sort of random IO in case of bad IO or threads scheduler
You can download from : https://dev.mysql.com/downloads/benchmarks.html
Github source : https://github.com/akopytov/sysbench
[ec2-user@dbversity.com ~]$ ll -lhtr sysbench-0.4.12.7.tar.gz
-rw-rw-r– 1 ec2-user ec2-user 693K Apr 22 21:02 sysbench-0.4.12.7.tar.gz
[ec2-user@dbversity.com ~]$
[ec2-user@dbversity.com ~]$ tar -zxvf sysbench-0.4.12.7.tar.gz
sysbench-0.4.12.7/
sysbench-0.4.12.7/acinclude.m4
sysbench-0.4.12.7/aclocal.m4
— blah blah blah —
sysbench-0.4.12.7/autom4te.cache/requests
sysbench-0.4.12.7/autom4te.cache/traces.0
sysbench-0.4.12.7/autom4te.cache/traces.1
[ec2-user@dbversity.com ~]$
[ec2-user@dbversity.com ~]$ ll -lhtr
drwxr-xr-x 6 ec2-user ec2-user 4.0K Jun 18 2013 sysbench-0.4.12.7
-rw-rw-r– 1 ec2-user ec2-user 693K Apr 22 21:02 sysbench-0.4.12.7.tar.gz
[ec2-user@dbversity.com ~]$
[ec2-user@dbversity.com ~]$ cd sysbench-0.4.12.7
[ec2-user@dbversity.com sysbench-0.4.12.7]$
[ec2-user@dbversity.com sysbench-0.4.12.7]$ ll -lhtr
total 992K
-rw-r–r– 1 ec2-user ec2-user 0 Sep 23 2010 TODO
-rw-r–r– 1 ec2-user ec2-user 973 Sep 23 2010 README-WIN.txt
-rw-r–r– 1 ec2-user ec2-user 3.0K Sep 23 2010 README
-rwxr-xr-x 1 ec2-user ec2-user 2.0K Sep 23 2010 mkinstalldirs
-rwxr-xr-x 1 ec2-user ec2-user 11K Sep 23 2010 missing
-rw-r–r– 1 ec2-user ec2-user 815 Sep 23 2010 Makefile.am
-rwxr-xr-x 1 ec2-user ec2-user 7.0K Sep 23 2010 install-sh
-rw-r–r– 1 ec2-user ec2-user 9.1K Sep 23 2010 INSTALL
-rw-r–r– 1 ec2-user ec2-user 18K Sep 23 2010 COPYING
-rwxr-xr-x 1 ec2-user ec2-user 381 Sep 23 2010 autogen.sh
-rw-r–r– 1 ec2-user ec2-user 17K Sep 23 2010 acinclude.m4
-rw-r–r– 1 ec2-user ec2-user 310K Sep 23 2010 aclocal.m4
-rw-r–r– 1 ec2-user ec2-user 24K Sep 23 2010 Makefile.in
-rwxr-xr-x 1 ec2-user ec2-user 526K Sep 23 2010 configure
-rw-r–r– 1 ec2-user ec2-user 11K Oct 12 2011 ChangeLog
-rw-r–r– 1 ec2-user ec2-user 5.4K Jun 18 2013 configure.ac
drwxr-xr-x 4 ec2-user ec2-user 4.0K Apr 22 21:10 sysbench
drwxr-xr-x 3 ec2-user ec2-user 4.0K Apr 22 21:10 doc
drwxr-xr-x 2 ec2-user ec2-user 4.0K Apr 22 21:10 config
drwxr-xr-x 2 ec2-user ec2-user 4.0K Apr 22 21:10 autom4te.cache
[ec2-user@dbversity.com sysbench-0.4.12.7]$
[ec2-user@dbversity.com sysbench-0.4.12.7]$ cat README
Installing:
See the file INSTALL for generic installation instructions.
In most cases you will need the following steps:
./autogen.sh (unnecessary if you are building from a release tarball)
./configure (or ./configure –without-mysql to compile w/o MySQL support)
make
make install
Running:
The general syntax is
sysbench [<general-options>] [<test-options>] <command>
To see available options, tests and commands type:
sysbench help
or
sysbench –test=<name> help
to see options supported by a specified test. Default values for the options
are specified in brackets after description.
Currently supported commands are help, run and create-db (for the MySQL test).
The latter will create a table and fill it with values required to run the
MySQL test, using database, table name and size passed as MySQL test options.
[ec2-user@dbversity.com sysbench-0.4.12.7]$
[ec2-user@dbversity.com sysbench-0.4.12.7]$ cat /proc/version
Linux version 3.14.35-28.38.amzn1.x86_64 (mockbuild@gobi-build-64012) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Wed Mar 11 22:50:37 UTC 2015
[ec2-user@dbversity.com sysbench-0.4.12.7]$
[ec2-user@dbversity.com sysbench-0.4.12.7]$
[root@dbversity.com sysbench-0.4.12.7]# ./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
— blah blah blah —
config.status: executing depfiles commands
config.status: executing libtool commands
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]# make
Making all in doc
make[1]: Entering directory `/home/ec2-user/sysbench-0.4.12.7/doc’
Making all in xsl
— blah blah blah —
make[1]: Leaving directory `/home/ec2-user/sysbench-0.4.12.7′
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]# make install
Making install in doc
make[1]: Entering directory `/home/ec2-user/sysbench-0.4.12.7/doc’
— blah blah blah —
make[2]: Leaving directory `/home/ec2-user/sysbench-0.4.12.7′
make[1]: Leaving directory `/home/ec2-user/sysbench-0.4.12.7′
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]#
[root@dbversity.com sysbench-0.4.12.7]# cd sysbench/
[root@dbversity.com sysbench]# ll -lhtr
total 800K
-rw-r–r– 1 ec2-user ec2-user 6.3K Sep 23 2010 sysbench.h
-rw-r–r– 1 ec2-user ec2-user 21K Sep 23 2010 sysbench.c
-rw-r–r– 1 ec2-user ec2-user 2.7K Sep 23 2010 sb_win.h
-rw-r–r– 1 ec2-user ec2-user 6.7K Sep 23 2010 sb_win.c
-rw-r–r– 1 ec2-user ec2-user 3.2K Sep 23 2010 sb_timer.h
-rw-r–r– 1 ec2-user ec2-user 5.4K Sep 23 2010 sb_timer.c
-rw-r–r– 1 ec2-user ec2-user 2.7K Sep 23 2010 sb_options.h
-rw-r–r– 1 ec2-user ec2-user 12K Sep 23 2010 sb_options.c
-rw-r–r– 1 ec2-user ec2-user 3.8K Sep 23 2010 sb_logger.h
-rw-r–r– 1 ec2-user ec2-user 19K Sep 23 2010 sb_logger.c
-rw-r–r– 1 ec2-user ec2-user 3.3K Sep 23 2010 sb_list.h
-rw-r–r– 1 ec2-user ec2-user 1.6K Sep 23 2010 Makefile.am
-rw-r–r– 1 ec2-user ec2-user 7.9K Sep 23 2010 db_driver.h
-rw-r–r– 1 ec2-user ec2-user 12K Sep 23 2010 db_driver.c
-rw-r–r– 1 ec2-user ec2-user 12K Sep 23 2010 CMakeLists.txt
-rw-r–r– 1 ec2-user ec2-user 24K Apr 22 21:40 Makefile.in
-rw-r–r– 1 root root 24K Apr 22 21:46 Makefile
drwxr-xr-x 5 ec2-user ec2-user 4.0K Apr 22 21:46 drivers
drwxr-xr-x 8 ec2-user ec2-user 4.0K Apr 22 21:46 tests
-rw-r–r– 1 root root 72K Apr 22 21:46 sysbench.o
-rw-r–r– 1 root root 15K Apr 22 21:46 sb_timer.o
-rw-r–r– 1 root root 37K Apr 22 21:46 sb_options.o
-rw-r–r– 1 root root 57K Apr 22 21:46 sb_logger.o
-rw-r–r– 1 root root 40K Apr 22 21:46 db_driver.o
-rwxr-xr-x 1 root root 379K Apr 22 21:46 sysbench
[root@dbversity.com sysbench]#
[root@dbversity.com sysbench]# ./sysbench –test=cpu –cpu-max-prime=20000 run
sysbench 0.4.13: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Random number generator seed is 0 and will be ignored
Doing CPU performance benchmark
Threads started!
Done.
Maximum prime number checked in CPU test: 20000
Test execution summary:
total time: 28.3478s
total number of events: 10000
total time taken by event execution: 28.3453
per-request statistics:
min: 2.55ms
avg: 2.83ms
max: 3.35ms
approx. 95 percentile: 3.00ms
Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 28.3453/0.00
[root@dbversity.com sysbench]#