Mysqlパフォーマンステストツールsysbench
4561 ワード
バージョン:
sysbench 0.5
概要:
Sysbenchは、CPU、メモリ、ディスクI/O、スレッド、データベースのパフォーマンステストに使用できるオープンソース、モジュール化されたプラットフォーム間マルチスレッドパフォーマンステストツールです.
キーパラメータ:
結果解析:
重要な指標:
IOPS,QPS, TPS, Lantency IOPS ---> read/write requests per sec QPS ---> read/(total time) TPS ---> transactions per sec Latency---> response time(avg)
テストツールの分析:
メリット:
サポートされるテスト対象は多く、調整可能なパラメータも多く提供されています.
欠点:
作成されたテーブル構造は単純すぎて、各テーブルには4つのフィールド(id,k,c,pad)しかなく、実際の線上のいくつかのアプリケーションをシミュレートできない場合が多い.
その他のパラメータ:
sysbench 0.5
概要:
Sysbenchは、CPU、メモリ、ディスクI/O、スレッド、データベースのパフォーマンステストに使用できるオープンソース、モジュール化されたプラットフォーム間マルチスレッドパフォーマンステストツールです.
キーパラメータ:
sysbench --report-interval=10
--num-threads=32
--max-requests=999999999
--test=/tmp/oltp.lua
--oltp-table-size=1000000 # 100w
--oltp-tables-count=64 # 64 table
--db-driver=mysql
--mysql-table-engine=innodb
結果解析:
重要な指標:
IOPS,QPS, TPS, Lantency
OLTP test statistics:
queries performed:
read: 11600834
write: 3314524
other: 1657262
total: 16572620
transactions: 828631 (460.34 per sec.)
read/write requests: 14915358 (8286.17 per sec.)
other operations: 1657262 (920.69 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 1800.0304s
total number of events: 828631
total time taken by event execution: 57594.0055s
response time:
min: 8.80ms
avg: 69.51ms
max: 517.28ms
approx. 95 percentile: 115.94ms
Threads fairness:
events (avg/stddev): 25894.7188/304.08
execution time (avg/stddev): 1799.8127/0.04
テストツールの分析:
メリット:
サポートされるテスト対象は多く、調整可能なパラメータも多く提供されています.
欠点:
作成されたテーブル構造は単純すぎて、各テーブルには4つのフィールド(id,k,c,pad)しかなく、実際の線上のいくつかのアプリケーションをシミュレートできない場合が多い.
その他のパラメータ:
General options: #
--num-threads=N number of threads to use [1] # 。 1.
--max-requests=N limit for total number of requests [10000] # 。 10000,0 。
--max-time=N limit for total execution time in seconds [0] # , s。 0, 。
--forced-shutdown=STRING amount of time to wait after --max-time before forcing shutdown [off] # max-time 。 off。
--thread-stack-size=SIZE size of stack per thread [32K] # 。 32K。
--init-rng=[on|off] initialize random number generator [off] # 。 off。
--test=STRING test to run # 。
--debug=[on|off] print more debugging info [off] # 。 off。
--validate=[on|off] perform validation checks where possible [off] # 。 off。
--help=[on|off] print help and exit # 。
--version=[on|off] print version and exit # 。
Mysql options
--mysql-host=[LIST,...]:MySQL [localhost]。
--mysql-port=[LIST,...]:MySQL [3306]。
--mysql-socket=[LIST,...]:MySQL socket 。
--mysql-user=STRING:MySQL 。
--mysql-password=STRING:MySQL 。
--mysql-db=STRING:MySQL [sbtest]。
--mysql-compression[=on|off]: [off]。
OLTP options
--test: lua
--oltp_table_count=1:
--oltp-table-size=: , 1000, 1000
--rand-init=on: , 。
--num-threads=: , 。
--otlp-read-only=off:
--report-interval=10: , ,0.5
--rand-type=special: , uniform( ), Gaussian( ), special( )。 special ,special ,uniform
--rand-spec-pct=5:
--mysql-table-engine=$type: ,innodb/myisam/tokudb/ 。
--max-time=8000: , , --max-requests
--oltp-test-mode=nontrx: , 。 simple,complex,nontrx。 complex
simple: ,SELECT c FROM sbtest WHERE id=N
complex (advanced transactional): begin commit, , 、 、 、 、 、 , , 。
nontrx (non-transactional): simple , update/insert , , cleanup,prepare。
--oltp-skip-trx=[on|off]: begin/commit 。 off
--max-requests: , max-time 。
Compiled-in tests: #
fileio - File I/O test #IO
cpu - CPU performance test #CPU
memory - Memory functions speed test #
threads - Threads subsystem performance test #
mutex - Mutex performance test #
oltp - OLTP test # ,