MySQL Benchmark Suiteによるパフォーマンス測定

MySQL Benchmark Suiteによるパフォーマンス測定の方法をまとめました。

※目次をクリックすると目次の下部にコンテンツが表示されます。

MySQL Benchmark Suiteをインストール
1)RPMパッケージ名の確認
 
sql-benchを検索キーワードにしてどのパッケージ含まれるか調べます。
 
# yum provides “*sql-bench*”
  :
mysql-bench-5.1.73-3.el6_5.i686 : MySQL benchmark scripts and data
Repo : base
Matched from:
Filename : /usr/share/sql-bench/Data/ATIS/class_of_service.txt
 
mysql-benchという名前のRPMパッケージに含まれています。
 
2)mysql-benchをインストール
 
# yum install mysql-bench
 
3)ベンチマークの種類を確認
 
# cd /usr/share/sql-bench/
# ls
Comments innotest1a test-alter-table
Data innotest1b test-big-table
README innotest2 test-connect
bench-count-distinct innotest2a test-create
bench-init.pl innotest2b test-insert
compare-results limits test-select
copy-db output test-transactions
crash-me run-all-tests test-wisconsin
graph-compare-results server-cfg
innotest1 test-ATIS

テストの実行方法
1)すべてテストを実行する例
 
./run-all-tests –server=mysql –user=root –log –fast
 
outputディレクトリにログが出力されます。
 
2)insertのテストを実行する例
 
# ./test-insert –server=mysql –user=root –log –fast
 
Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.

Generating random keys
Creating tables
Inserting 100000 multiple-value rows in order
Inserting 100000 multiple-value rows in reverse order
Inserting 100000 multiple-value rows in random order
Time for insert (300000): 10 wallclock secs ( 1.13 usr 0.05 sys + 0.00 cusr 0.00 csys = 1.18 CPU)

Time for book-keeping (1): 1 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.01 CPU)
    :
    :

関連記事の目次

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください