[CentOS] sysbench 설치 및 OLTP test Linux

OS : CentOS 6.4 x64

Sysbench v0.4.12 (2009-03-19)
Download : http://sourceforge.net/projects/sysbench/files/sysbench/



1. Sysbench 다운 및 설치

# wget http://sourceforge.net/projects/sysbench/files/sysbench/0.4.12/sysbench-0.4.12.tar.gz/download

# tar xvfz sysbench-0.4.12.tar.gz
# cd sysbench-0.4.12

# libtoolize --force --copy
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
# ./autogen.sh
# ./configure
# make&&make install



2. test DB 생성

# mysql -u root -p mysql

mysql> create database sbtest;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on sbtest.* to sbtest@localhost identified by 'sbtest' with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all on sbtest.* to sbtest identified by 'sbtest' with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit



3. sysbench Test

# sysbench --test=oltp --oltp-table-size=1000000 --mysql-password=sbtest --mysql-socket=/var/lib/mysql/mysql.sock prepare
sysbench 0.4.12:  multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
Creating table 'sbtest'...
Creating 1000000 records in table 'sbtest'...


#  sysbench --num-threads=16 --max-requests=1000000 --test=oltp --oltp-table-size=1000000 --mysql-socket=/var/lib/mysql/mysql.sock --mysql-password=sbtest run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
Running the test with following options:
Number of threads: 16

Doing OLTP test.
Running mixed OLTP test
Using Special distribution (12 iterations,  1 pct of values are returned in 75 pct cases)
Using "BEGIN" for starting transactions
Using auto_inc on the id column
Maximum number of requests for OLTP test is limited to 1000000
Threads started!
Done.

OLTP test statistics:
    queries performed:
        read:                            14003570
        write:                           5001275
        other:                           2000510
        total:                           21005355
    transactions:                        1000255 (108.18 per sec.)
    deadlocks:                           0      (0.00 per sec.)
    read/write requests:                 19004845 (2055.44 per sec.)
    other operations:                    2000510 (216.36 per sec.)

Test execution summary:
    total time:                          9246.1222s
    total number of events:              1000255
    total time taken by event execution: 147928.6183
    per-request statistics:
         min:                                  8.77ms
         avg:                                147.89ms
         max:                               1180.10ms
         approx.  95 percentile:             288.12ms

Threads fairness:
    events (avg/stddev):           62515.9375/81.52
    execution time (avg/stddev):   9245.5386/0.02





1 2 3 4 5 6 7 8 9 10 다음



통계 위젯 (블랙)

816
284
339733

이 이글루를 링크한 사람 (화이트)

2

google

구글_이글루스_사이드