性能測試工具sysbench簡介

發表于:2014-01-20來源:IT博客大學習作者:NinGoo點擊數: 標簽:sysbench
性能測試工具sysbench簡介.您現在的位置:首頁 --> Oracle --> 性能測試工具sysbench簡介 性能測試工具sysbench簡介 出處信息 sysbench是一款開源的多線程性能測試工具,可以執行CPU/內存/線程/IO/數據庫等方面的性能測試。數據庫目前支持MySQL/Or

  您現在的位置:首頁 --> Oracle --> 性能測試工具sysbench簡介

  性能測試工具sysbench簡介

  出處信息

  sysbench是一款開源的多線程性能測試工具,可以執行CPU/內存/線程/IO/數據庫等方面的性能測試。數據庫目前支持MySQL/Oracle /PostgreSQL。本文只是簡單演示一下幾種測試的用法,后續準備利用sysbench來對MySQL進行一系列的測試。具體的一些參數設置,需要根據不同的測試要求來進行調整。

  下載

  http://sourceforge.net/projects/sysbench/

  編譯安裝

  默認支持MySQL,如果需要測試Oracle/PostgreSQL,則在configure時需要加上-with-oracle或者-with-pgsql參數

以下是引用片段:
./configure --prefix=/u01/sysbench \
--with-mysql-includes=/opt/mysql/include/mysql \
--with-mysql-libs=/opt/mysql/lib/mysql

make && make install

  參數

以下是引用片段:
NinGoo:/u01/sysbench/bin>$sysbench
Missing required command argument.
Usage:
  sysbench [general-options]... --test= [test-options]... command

General options:
  --num-threads=N            number of threads to use [1]
  --max-requests=N           limit for total number of requests [10000]
  --max-time=N               limit for total execution time in seconds [0]
  --forced-shutdown=STRING   amount of time to wait after --max-time before forcing shutdown [off]
  --thread-stack-size=SIZE   size of stack per thread [32K]
  --init-rng=[on|off]        initialize random number generator [off]
  --test=STRING              test to run
  --debug=[on|off]           print more debugging info [off]
  --validate=[on|off]        perform validation checks where possible [off]
  --help=[on|off]            print help and exit
  --version=[on|off]         print version and exit

Compiled-in tests:
  fileio - File I/O test
  cpu - CPU performance test
  memory - Memory functions speed test
  threads - Threads subsystem performance test
  mutex - Mutex performance test
  oltp - OLTP test

Commands: prepare run cleanup help version
See ’sysbench --test= help’ for a list of options for each test.

  CPU測試

  sysbench采用尋找最大素數的方式來測試CPU的性能

以下是引用片段:
NinGoo:/u01/sysbench/bin>$sysbench --test=cpu --cpu-max-prime=2000 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 2000

Test execution summary:
    total time:                          2.3996s
    total number of events:              10000
    total time taken by event execution: 2.3917
    per-request statistics:
         min:                                  0.23ms
         avg:                                  0.24ms
         max:                                 27.44ms
         approx.  95 percentile:               0.24ms

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

原文轉自:http://blogread.cn/it/article/623

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97