• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 性能測試工具sysbench簡介(4)

    發表于:2013-12-12來源:IT博客大學習作者:  NinGoo點擊數: 標簽:性能測試工具
    MySQL數據庫測試 首先需要創建默認的sbtest數據庫,或者使用-mysql-db指定一個已經存在的數據庫 生成測試數據,引擎為myisam,表大小為1000000條記錄 以下是引用

      MySQL數據庫測試

      首先需要創建默認的sbtest數據庫,或者使用-mysql-db指定一個已經存在的數據庫

      生成測試數據,引擎為myisam,表大小為1000000條記錄

    以下是引用片段:
    NinGoo:/u01/sysbench/bin>$sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000000 \
    --mysql-user=root --mysql-socket=/opt/mysql/run/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’...

    root@sbtest 11:42:18>desc sbtest.sbtest;
    +-------+------------------+------+-----+---------+----------------+
    | Field | Type             | Null | Key | Default | Extra          |
    +-------+------------------+------+-----+---------+----------------+
    | id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
    | k     | int(10) unsigned | NO   | MUL | 0       |                |
    | c     | char(120)        | NO   |     |         |                |
    | pad   | char(60)         | NO   |     |         |                |
    +-------+------------------+------+-----+---------+----------------+

      執行測試

    以下是引用片段:
    NinGoo:/u01/sysbench/bin>$sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000000 \
    --mysql-user=root --mysql-socket=/opt/mysql/run/mysql.sock 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: 1

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

    OLTP test statistics:
        queries performed:
            read:                            140000
            write:                           50000
            other:                           20000
            total:                           210000
        transactions:                        10000  (336.64 per sec.)
        deadlocks:                           0      (0.00 per sec.)
        read/write requests:                 190000 (6396.11 per sec.)
        other operations:                    20000  (673.27 per sec.)

    Test execution summary:
        total time:                          29.7056s
        total number of events:              10000
        total time taken by event execution: 29.6301
        per-request statistics:
             min:                                  2.27ms
             avg:                                  2.96ms
             max:                                 43.88ms
             approx.  95 percentile:               3.36ms

    Threads fairness:
        events (avg/stddev):           10000.0000/0.00
        execution time (avg/stddev):   29.6301/0.00

    原文轉自:http://blogread.cn/it/article/623?f=sa

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>