注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

A small step

Judgement Must

 
 
 

日志

 
 
关于我

不要因为急着赶路,让自己的步伐杂乱。远方是既定的目标,但路上才是最重要的经历!

网易考拉推荐

sysbench 操作  

2015-07-23 14:27:23|  分类: Database |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
./bin/sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw
上述参数指定了最大创建16个线程,创建的文件总大小为3G,文件读写模式为随机读

./bin/sysbench --test=fileio --num-threads=32 --file-total-size=3G --file-test-mode=rndrw
Test execution summary:
    total time:                          13.1246s
    total number of events:              10001
    total time taken by event execution: 35.6855
    per-request statistics:
         min:                                  0.01ms
         avg:                                  3.57ms
         max:                                528.62ms
         approx.  95 percentile:              17.33ms

Threads fairness:
    events (avg/stddev):           312.5312/160.93
    execution time (avg/stddev):   1.1152/0.36
./bin/sysbench --test=fileio --num-threads=64 --file-total-size=3G --file-test-mode=rndrw
Test execution summary:
    total time:                          11.8931s
    total number of events:              10001
    total time taken by event execution: 97.8594
    per-request statistics:
         min:                                  0.01ms
         avg:                                  9.78ms
         max:                               2483.94ms
         approx.  95 percentile:              66.20ms

Threads fairness:
    events (avg/stddev):           156.2656/100.42
    execution time (avg/stddev):   1.5291/0.78
Running the test with following options:
Number of threads: 64

Extra file open flags: 0
128 files, 24Mb each
3Gb total file size
Block size 16Kb
Number of random requests for random IO: 10000
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Threads started!
Done.

Operations performed:  5998 Read, 4003 Write, 12803 Other = 22804 Total
Read 93.719Mb  Written 62.547Mb  Total transferred 156.27Mb  (13.139Mb/sec)
  840.91 Requests/sec executed
  
  
当数据库连接数不断增加时(从100~1000,每次递增200),MySQL平均每秒处理事务(读写混合模式和只读模式)的能力。该测试方案中, 表的大小不变,始终是100万行;表的类型是innodb;测试过程是否完成以处理的事务数来计算,即MySQL完成了10万次的事务数(读或写)后,测 试完成。

./bin/sysbench --test=oltp --mysql-user=root --mysql-socket=/tmp/mysql.sock --oltp-table-size=1000000 --mysql-db=test --oltp-table-name=sbtest  --max-requests=100000  --num-threads=100  --mysql-table-engine=innodb prepare/run/cleanup
  
  
  sysbench 0.4.10:  multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
WARNING: Preparing of "BEGIN" is unsupported, using emulation
(last message repeated 99 times)
Running the test with following options:
Number of threads: 100

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 100000
Threads started!
Done.

OLTP test statistics:
    queries performed:
        read:                            1400112
        write:                           500040
        other:                           200016
        total:                           2100168
    transactions:                        100008 (517.68 per sec.)
    deadlocks:                           0      (0.00 per sec.)
    read/write requests:                 1900152 (9835.99 per sec.)
    other operations:                    200016 (1035.37 per sec.)

Test execution summary:
    total time:                          193.1836s
    total number of events:              100008
    total time taken by event execution: 19315.2065
    per-request statistics:
         min:                                  4.51ms
         avg:                                193.14ms
         max:                               3693.88ms
         approx.  95 percentile:             476.55ms

Threads fairness:
    events (avg/stddev):           1000.0800/15.06
    execution time (avg/stddev):   193.1521/0.01
./bin/sysbench --test=oltp --mysql-user=root --mysql-socket=/tmp/mysql.sock --oltp-table-size=1000000 --mysql-db=test --oltp-table-name=sbtest  --max-requests=100000  --num-threads=200  --mysql-table-engine=innodb run
sysbench 0.4.10:  multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
WARNING: Preparing of "BEGIN" is unsupported, using emulation
(last message repeated 199 times)
Running the test with following options:
Number of threads: 200

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 100000
Threads started!
Done.

OLTP test statistics:
    queries performed:
        read:                            1400154
        write:                           500055
        other:                           200022
        total:                           2100231
    transactions:                        100011 (493.27 per sec.)
    deadlocks:                           0      (0.00 per sec.)
    read/write requests:                 1900209 (9372.21 per sec.)
    other operations:                    200022 (986.55 per sec.)

Test execution summary:
    total time:                          202.7493s
    total number of events:              100011
    total time taken by event execution: 40515.3381
    per-request statistics:
         min:                                  3.42ms
         avg:                                405.11ms
         max:                               6246.64ms
         approx.  95 percentile:            1170.50ms

Threads fairness:
    events (avg/stddev):           500.0550/9.17
    execution time (avg/stddev):   202.5767/0.06
./bin/sysbench --test=oltp --mysql-user=root --mysql-socket=/tmp/mysql.sock --oltp-table-size=1000000 --mysql-db=test --oltp-table-name=sbtest  --max-requests=100000  --num-threads=500  --mysql-table-engine=innodb run
No DB drivers specified, using mysql
WARNING: Preparing of "BEGIN" is unsupported, using emulation
(last message repeated 499 times)
Running the test with following options:
Number of threads: 500

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 100000
Threads started!
Done.

OLTP test statistics:
    queries performed:
        read:                            1400140
        write:                           500050
        other:                           200020
        total:                           2100210
    transactions:                        100010 (486.86 per sec.)
    deadlocks:                           0      (0.00 per sec.)
    read/write requests:                 1900190 (9250.32 per sec.)
    other operations:                    200020 (973.72 per sec.)

Test execution summary:
    total time:                          205.4188s
    total number of events:              100010
    total time taken by event execution: 102180.1553
    per-request statistics:
         min:                                  3.17ms
         avg:                               1021.70ms
         max:                               7092.21ms
         approx.  95 percentile:            3124.46ms

Threads fairness:
    events (avg/stddev):           200.0200/7.07
    execution time (avg/stddev):   204.3603/0.31

[root@ipaddr095 mysqltest]# /opt/sysbench/bin/sysbench --test=oltp --mysql-user=root --mysql-socket=/tmp/mysql.sock --oltp-table-size=1000000 --mysql-db=test --oltp-table-name=sbtest  --max-requests=100000  --num-threads=100 --oltp-read-only=on  --mysql-table-engine=innodb run
sysbench 0.4.10:  multi-threaded system evaluation benchmark
  评论这张
 
阅读(4)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018