mysql基准测试--sysbench

Mysql基准测试

下载sysbench-0.4.10.tar.gz(http://download.chinaunix.net/download.php?id=26070&ResourceID=12695)

 

tar -zxvfsysbench-0.4.10.tar.gz

配置

./configure-prefix=/usr/local/sysbench -with-mysql-includes=/usr/include/mysql/-with-mysql-libs=/usr/lib64/mysql/

make&& make install

sysbench的cpu基准测试

cat/proc/cpuinfo | more

modelname      : Intel(R) Xeon(R) CPU E7-8837  @ 2.67GHz

stepping        : 2

cpuMHz         : 2659.992

cachesize      : 24576 KB

cpucores       : 2

 

 

/usr/local/sysbench/bin/sysbench--test=cpu --cpu-max-prime=20000 run

Testexecution summary:

totaltime:                          24.6696s

sysbench的文件I/O基准测试

准备测试数据10G

/usr/local/sysbench/bin/sysbench--test=fileio --file-total-size=10G prepare

/usr/local/sysbench/bin/sysbench--test=fileio --file-total-size=10G --file-test-mode=rndrw --init-rng=on--max-time=300 --max-requests=0 run

sysbench0.4.10:  multi-threaded system evaluationbenchmark

 

Runningthe test with following options:

Number ofthreads: 1

Initializingrandom number generator from timer.

 

 

Extrafile open flags: 0

128files, 80Mb each

10Gbtotal file size

Blocksize 16Kb

Number ofrandom requests for random IO: 0

Read/Writeratio for combined random IO test: 1.50

PeriodicFSYNC enabled, calling fsync() each 100 requests.

Callingfsync() at the end of test, Enabled.

Usingsynchronous I/O mode

Doingrandom r/w test

Threadsstarted!

 

 

 

 

 

 

 

 

Timelimit exceeded, exiting...

Done.

 

Operationsperformed:  83947 Read, 55964 Write,179072 Other = 318983 Total

Read1.2809Gb  Written 874.44Mb  Total transferred 2.1349Gb  (7.2867Mb/sec)

  466.35 Requests/sec executed

 

Testexecution summary:

    total time:                          300.0135s

    total number of events:              139911

    total time taken by event execution:260.0970

    per-request statistics:

         min:                                  0.01ms

         avg:                                  1.86ms

         max:                                196.41ms

         approx.  95 percentile:               6.92ms

 

Threadsfairness:

    events (avg/stddev):           139911.0000/0.00

    execution time (avg/stddev):   260.0970/0.00

每秒请求数466.35 Requests 吞吐量7.2867Mb/sec

清扫战场

/usr/local/sysbench/bin/sysbench--test=fileio --file-total-size=10G cleanup

Sysbench的oltp基准测试

制造数据

/usr/local/sysbench/bin/sysbench--test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root--mysql-password='test' prepare

八个并发线程只读模式测试时长60秒:

/usr/local/sysbench/bin/sysbench--test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root--mysql-password='test' --max-time=60 --oltp-read-only=on --max-requests=0--num-threads=8 run

 

sysbench 0.4.10:  multi-threaded system evaluation benchmark

 

No DB drivers specified, using mysql

WARNING: Preparing of "BEGIN" isunsupported, using emulation

(last message repeated 7 times)

Running the test with following options:

Number of threads: 8

 

Doing OLTP test.

Running mixed OLTP test

Doing read-only test

Using Special distribution (12iterations,  1 pct of values are returnedin 75 pct cases)

Using "BEGIN" for startingtransactions

Using auto_inc on the id column

Threads started!

 

Time limit exceeded, exiting...

(last message repeated 7 times)

Done.

 

OLTP test statistics:

   queries performed:

       read:                           551124

       write:                           0

       other:                          78732

        total:                           629856

   transactions:                       39366  (656.05 per sec.)

   deadlocks:                          0      (0.00 per sec.)

   read/write requests:                551124 (9184.64 per sec.)

   other operations:                   78732  (1312.09 per sec.)

 

Test execution summary:

   total time:                         60.0050s

   total number of events:             39366

   total time taken by event execution: 479.7678

   per-request statistics:

        min:                                 2.19ms

        avg:                                12.19ms

        max:                               133.47ms

        approx.  95 percentile:              18.11ms

 

Threads fairness:

   events (avg/stddev):          4920.7500/75.30

   execution time (avg/stddev):  59.9710/0.00

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值