某誌用にFedora 19 for x86_64で取得したベンチマーク。某所で見つけた結果はたぶん両者で同じテスト回数(community-mysql-benchとmariadb-benchではなぜかクエリ回数が異なる)になってない。自分もはまったwww 両方のテスト結果を/usr/share/sql-bench/compare-results
すると気付く。
注記:ディストリそのままだとcommunity-mysql-serverとmariadb-libsがインストールされてしまうので、python-DBD-MySQLは自前でリビルド。
- community-mysql-5.5.32-2
- community-mysql-server-5.5.32-2
- community-mysql-libs-5.5.32-2
- community-mysql-common-5.5.32-2
- mariadb-5.5.31-4
- mariadb-server-5.5.31-4
- mariadb-libs-5.5.31-4
比較結果。時間が小さい方がパフォーマンスが良い。簡単なベンチなので、これが全てを説明するものではないけれど、SELECTはMariaDBの方が遅く、INSERTではMariaDBの方がかなり高速。コネクションプールしない場合、connectがMariaDBは1割遅いのでネックになりそう。
The result logs which where found and the options:
1 mysql-mariadb : MySQL 5.5.31 MariaDB
2 mysql-mysql : MySQL 5.5.32
=====================================================
Operation | 1| 2|
|mysql-m|mysql-m|
-----------------------------------------------------
Results per test in seconds: |
-----------------------------------------------------
ATIS | 4.00| 7.00|
alter-table | 20.00| 20.00|
big-tables | 6.00| 7.00|
connect | 28.00| 25.00|
create | 96.00| 115.00|
insert |1375.00|1845.00|
select | 119.00| 107.00|
wisconsin | 7.00| 13.00|
-----------------------------------------------------
The results per operation: |
-----------------------------------------------------
alter_table_add (100) | 9.00| 10.00|
alter_table_drop (91) | 9.00| 9.00|
connect (10000) | 1.00| 2.00|
connect+select_1_row (10000) | 2.00| 3.00|
connect+select_simple (10000) | 2.00| 2.00|
count (100) | 6.00| 5.00|
count_distinct (1000) | 2.00| 2.00|
count_distinct_2 (1000) | 4.00| 3.00|
count_distinct_big (120) | 3.00| 4.00|
count_distinct_group (1000) | 4.00| 3.00|
count_distinct_group_on_key (1000) | 3.00| 3.00|
count_distinct_group_on_key_parts (1| 4.00| 4.00|
count_distinct_key_prefix (1000) | 2.00| 1.00|
count_group_on_key_parts (1000) | 3.00| 3.00|
count_on_key (50100) | 31.00| 27.00|
create+drop (10000) | 21.00| 27.00|
create_MANY_tables (10000) | 21.00| 25.00|
create_index (8) | 1.00| 0.00|
create_key+drop (10000) | 45.00| 50.00|
create_table (31) | 0.00| 0.00|
delete_all_many_keys (1) | 209.00| 329.00|
delete_big (1) | 0.00| 0.00|
delete_big_many_keys (128) | 209.00| 329.00|
delete_key (10000) | 2.00| 3.00|
delete_range (12) | 3.00| 3.00|
drop_index (8) | 0.00| 0.00|
drop_table (28) | 0.00| 0.00|
drop_table_when_MANY_tables (10000) | 6.00| 11.00|
insert (350768) | 65.00| 123.00|
insert_duplicates (100000) | 4.00| 3.00|
insert_key (100000) | 224.00| 249.00|
insert_many_fields (2000) | 2.00| 3.00|
insert_select_1_key (1) | 2.00| 3.00|
insert_select_2_keys (1) | 3.00| 3.00|
min_max (60) | 2.00| 2.00|
min_max_on_key (85000) | 5.00| 5.00|
multiple_value_insert (100000) | 2.00| 3.00|
once_prepared_select (100000) | 6.00| 6.00|
order_by_big (10) | 2.00| 2.00|
order_by_big_key (10) | 1.00| 1.00|
order_by_big_key2 (10) | 1.00| 1.00|
order_by_big_key_desc (10) | 2.00| 2.00|
order_by_big_key_diff (10) | 2.00| 1.00|
order_by_big_key_prefix (10) | 2.00| 2.00|
order_by_key2_diff (500) | 0.00| 1.00|
order_by_key_prefix (500) | 0.00| 0.00|
order_by_range (500) | 0.00| 0.00|
outer_join (10) | 6.00| 5.00|
outer_join_found (10) | 6.00| 6.00|
outer_join_not_found (500) | 6.00| 4.00|
outer_join_on_key (10) | 4.00| 3.00|
prepared_select (100000) | 8.00| 7.00|
select_1_row (100000) | 5.00| 3.00|
select_1_row_cache (100000) | 4.00| 4.00|
select_2_rows (100000) | 4.00| 3.00|
select_big (80) | 2.00| 2.00|
select_big_str (10000) | 1.00| 1.00|
select_cache (10000) | 24.00| 21.00|
select_cache2 (10000) | 24.00| 22.00|
select_column+column (100000) | 5.00| 4.00|
select_diff_key (500) | 0.00| 0.00|
select_distinct (800) | 0.00| 0.00|
select_group (2911) | 6.00| 5.00|
select_group_when_MANY_tables (10000| 3.00| 2.00|
select_join (100) | 0.00| 0.00|
select_key (200000) | 15.00| 13.00|
select_key2 (200000) | 17.00| 14.00|
select_key2_return_key (200000) | 15.00| 14.00|
select_key2_return_prim (200000) | 16.00| 14.00|
select_key_prefix (200000) | 17.00| 14.00|
select_key_prefix_join (100) | 1.00| 1.00|
select_key_return_key (200000) | 15.00| 13.00|
select_many_fields (2000) | 4.00| 4.00|
select_range (410) | 16.00| 11.00|
select_range_key2 (25010) | 2.00| 2.00|
select_range_prefix (25010) | 3.00| 2.00|
select_simple (100000) | 2.00| 1.00|
select_simple_cache (100000) | 2.00| 2.00|
select_simple_join (500) | 0.00| 0.00|
update_big (10) | 26.00| 26.00|
update_of_key (50000) | 12.00| 20.00|
update_of_key_big (501) | 8.00| 18.00|
update_of_primary_key_many_keys (256| 564.00| 781.00|
update_with_key (300000) | 63.00| 111.00|
update_with_key_prefix (100000) | 24.00| 41.00|
wisc_benchmark (114) | 1.00| 1.00|
-----------------------------------------------------
TOTALS |1858.00|2463.00|
=====================================================
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping : 7
microcode : 0x28
cpu MHz : 1598.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6784.79
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping : 7
microcode : 0x28
cpu MHz : 1802.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6784.79
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping : 7
microcode : 0x28
cpu MHz : 1632.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6784.79
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping : 7
microcode : 0x28
cpu MHz : 1632.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6784.79
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping : 7
microcode : 0x28
cpu MHz : 2040.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6784.79
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping : 7
microcode : 0x28
cpu MHz : 1802.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6784.79
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping : 7
microcode : 0x28
cpu MHz : 1700.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6784.79
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
stepping : 7
microcode : 0x28
cpu MHz : 1768.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6784.79
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
# free
total used free shared buffers cached
Mem: 16345972 4236832 12109140 0 205032 2945920
-/+ buffers/cache: 1085880 15260092
Swap: 8200188 0 8200188