2011年2月16日水曜日

"mysql-bench"でMySQLのベンチマーク

スズキです。

とりあえず、こんな感じです。
(localhostでMySQLが立ち上がってることが前提です)

# yum -y install mysql-bench
# cd /usr/share/sql-bench/
# ./run-all-tests
--------
Benchmark DBD suite: 2.15
Date of test: 2011-02-05 20:43:27
Running tests on: Linux 2.6.16-xenU i686
Arguments:
Comments:
Limits from:
Server version: MySQL 5.1.54
Optimization: None
Hardware:

alter-table: Total time: 23 wallclock secs ( 0.06 usr 0.00 sys +
0.00 cusr 0.00 csys = 0.06 CPU)
ATIS: Total time: 24 wallclock secs ( 2.60 usr 0.12 sys + 0.00 cusr
0.00 csys = 2.72 CPU)
big-tables: Total time: 135 wallclock secs ( 1.95 usr 0.22 sys +
0.00 cusr 0.00 csys = 2.17 CPU)
connect: Total time: 517 wallclock secs (15.46 usr 6.71 sys + 0.00
cusr 0.00 csys = 22.17 CPU)
create: Total time: 192 wallclock secs ( 0.49 usr 0.26 sys + 0.00
cusr 0.00 csys = 0.75 CPU)
insert: Total time: 6710 wallclock secs (164.28 usr 23.75 sys + 0.00
cusr 0.00 csys = 188.03 CPU)
select: Estimated total time: 3483.64 wallclock secs (16.65 usr 1.69
sys + 0.00 cusr 0.00 csys = 18.34 CPU)
transactions: Test skipped because the database doesn't support transactions
wisconsin: Total time: 149 wallclock secs ( 1.39 usr 0.37 sys + 0.00
cusr 0.00 csys = 1.76 CPU)

All 9 test executed successfully

Tests with estimated time have a + at end of line
Totals per operation:
Operation seconds usr sys cpu tests

alter_table_add 9.00 0.03 0.00 0.03 100
alter_table_drop 10.00 0.01 0.00 0.01 91
connect 4.00 1.80 0.37 2.17 10000
connect+select_1_row 35.00 2.17 0.40 2.57 10000
connect+select_simple 80.00 1.93 0.48 2.41 10000
count 109.00 0.08 0.00 0.08 100
count_distinct 151.00 0.13 0.01 0.14 1000
count_distinct_2 9.00 0.07 0.02 0.09 1000
count_distinct_big 206.00 2.57 0.03 2.60 120
count_distinct_group 6.00 0.34 0.01 0.35 1000
count_distinct_group_on_key 193.00 0.14 0.02 0.16 1000
count_distinct_group_on_key_parts 104.00 0.27 0.01 0.28 1000
count_distinct_key_prefix 121.00 0.05 0.00 0.05 1000
count_group_on_key_parts 36.00 0.34 0.00 0.34 1000
count_on_key 1223.64 3.76 0.53 4.29 50100 +
create+drop 44.00 0.06 0.01 0.07 10000
create_MANY_tables 96.00 0.06 0.02 0.08 10000
create_index 2.00 0.01 0.00 0.01 8
create_key+drop 50.00 0.11 0.03 0.14 10000
create_table 2.00 0.00 0.00 0.00 31
delete_all_many_keys 217.00 0.01 0.01 0.02 1
delete_big 4.00 0.00 0.00 0.00 1
delete_big_many_keys 217.00 0.01 0.01 0.02 128
delete_key 1.00 0.10 0.10 0.20 10000
delete_range 56.00 0.00 0.00 0.00 12
drop_index 2.00 0.00 0.00 0.00 8
drop_table 0.00 0.00 0.00 0.00 28
drop_table_when_MANY_tables 1.00 0.12 0.12 0.24 10000
insert 365.00 3.91 3.03 6.94 350768
insert_duplicates 199.00 1.32 0.78 2.10 100000
insert_key 433.00 2.24 0.84 3.08 100000
insert_many_fields 2.00 0.10 0.01 0.11 2000
insert_select_1_key 1.00 0.00 0.00 0.00 1
insert_select_2_keys 2.00 0.00 0.00 0.00 1
min_max 45.00 0.01 0.00 0.01 60
min_max_on_key 171.00 5.36 0.81 6.17 85000
multiple_value_insert 13.00 0.15 0.01 0.16 100000
once_prepared_select 154.00 3.39 0.95 4.34 100000
order_by_big 199.00 7.18 0.10 7.28 10
order_by_big_key 182.00 7.45 0.14 7.59 10
order_by_big_key2 181.00 7.25 0.12 7.37 10
order_by_big_key_desc 108.00 7.38 0.21 7.59 10
order_by_big_key_diff 10.00 7.09 0.08 7.17 10
order_by_big_key_prefix 104.00 7.13 0.11 7.24 10
order_by_key2_diff 2.00 0.61 0.00 0.61 500
order_by_key_prefix 0.00 0.35 0.00 0.35 500
order_by_range 1.00 0.34 0.00 0.34 500
outer_join 200.00 0.00 0.00 0.00 10
outer_join_found 189.00 0.00 0.00 0.00 10
outer_join_not_found 177.00 0.00 0.00 0.00 500
outer_join_on_key 10.00 0.00 0.00 0.00 10
prepared_select 186.00 6.22 0.90 7.12 100000
select_1_row 120.00 1.49 0.84 2.33 100000
select_1_row_cache 7.00 1.22 0.88 2.10 100000
select_2_rows 129.00 1.49 0.92 2.41 100000
select_big 59.00 7.19 0.07 7.26 80
select_big_str 80.00 1.23 0.18 1.41 10000
select_cache 420.00 0.68 0.07 0.75 10000
select_cache2 495.00 0.60 0.19 0.79 10000
select_column+column 7.00 1.52 0.99 2.51 100000
select_diff_key 0.00 0.04 0.00 0.04 500
select_distinct 2.00 0.49 0.01 0.50 800
select_group 80.00 0.34 0.03 0.37 2911
select_group_when_MANY_tables 1.00 0.14 0.08 0.22 10000
select_join 0.00 0.14 0.00 0.14 100
select_key 379.00 14.31 2.02 16.33 200000
select_key2 495.00 13.79 2.07 15.86 200000
select_key2_return_key 386.00 12.96 2.31 15.27 200000
select_key2_return_prim 428.00 13.85 2.17 16.02 200000
select_key_prefix 475.00 13.88 1.99 15.87 200000
select_key_prefix_join 3.00 1.39 0.00 1.39 100
select_key_return_key 315.00 13.79 1.86 15.65 200000
select_many_fields 133.00 1.85 0.21 2.06 2000
select_range 486.00 2.99 0.02 3.01 410
select_range_key2 50.00 1.48 0.12 1.60 25010
select_range_prefix 21.00 1.54 0.13 1.67 25010
select_simple 50.00 1.32 0.80 2.12 100000
select_simple_cache 5.00 1.28 0.85 2.13 100000
select_simple_join 1.00 0.16 0.01 0.17 500
update_big 184.00 0.00 0.00 0.00 10
update_of_key 70.00 0.55 0.52 1.07 50000
update_of_key_big 129.00 0.00 0.01 0.01 501
update_of_primary_key_many_keys 69.00 0.00 0.00 0.00 256
update_with_key 361.00 3.30 2.31 5.61 300000
update_with_key_prefix 38.00 2.01 1.00 3.01 100000
wisc_benchmark 16.00 0.99 0.14 1.13 114

TOTALS 11416.64 199.66 33.07 232.73 3425950 +
--------

これでRDSのベンチマークもとってみよう。
--------
http://www.suz-lab.com

0 コメント: