Why is MySQL nearly twice as fast on Linux/AMD64
Vs.FreeBSD/AMD64?
JG
amd64list at jpgsworld.com
Fri May 21 07:25:32 PDT 2004
More benchmarks...
This time using super-smack.
--------------------------------------------------------------------
SERVER CONFIG:
** FreeBSD i386 **
amd32f# uname -a
FreeBSD 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Sun Jan 11 04:21:45 GMT 2004
Using Generic release Kernel
MySQL: Ver 4.1.1-alpha for portbld-freebsd5.2 on i386 (FreeBSD port:
mysql-server-4.1.1_2)
MySQL Port options: BUILD_OPTIMIZED=yes
MySQL compiled with linuxthreads: liblthread.so.3 =>
/usr/local/lib/liblthread.so.3
---------------------------------------------------------------------
Each benchmark ran 4 times and highest was shown.
---------------------------------------------------------------------
Benchmark results:
LOCAL:
- Using default mysql config settings (empty/missing my.cnf)
- Using SCHED_4BSD kernel
amd32f# super-smack update-select.smack 30 10000
Query Barrel Report for client smacker
connect: max=19ms min=12ms avg= 14ms from 30 clients
Query_type num_queries max_time min_time q_per_s
select_index 300000 9 0 2589.28
update_index 300000 7 0 2589.28
- Using my-huge.cnf w/mysql.sock
- Using SCHED_4BSD kernel
amd32f# super-smack update-select.smack 30 10000
Query Barrel Report for client smacker
connect: max=63ms min=13ms avg= 35ms from 30 clients
Query_type num_queries max_time min_time q_per_s
select_index 300000 11 0 2369.88
update_index 300000 7 0 2369.88
REMOTE (Over 100mbit LAN dc0 to bge0):
- Using default mysql config settings (empty/missing my.cnf)
- Using SCHED_4BSD kernel
devbox# super-smack update-select.smack 30 10000
Query Barrel Report for client smacker
connect: max=1431ms min=17ms avg= 731ms from 30 clients
Query_type num_queries max_time min_time q_per_s
select_index 300000 10 0 2091.10
update_index 300000 4 0 2091.10
- Using my-huge.cnf w/mysql.sock lines in update-select.smack uncommented
- Using SCHED_4BSD kernel
devbox# super-smack update-select.smack 30 10000
Query Barrel Report for client smacker
connect: max=817ms min=37ms avg= 326ms from 30 clients
Query_type num_queries max_time min_time q_per_s
select_index 300000 2 0 3718.13
update_index 300000 9 0 3718.13
*Note1: ps -H only shows 1 mysql line during test.
*Note2: vmstat -w 1 ID's ~20 during this test.
--------------------------------------------------------------------
SERVER CONFIG:
** FreeBSD AMD64 **
amd64f# uname -a
FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Wed May 19 03:37:58 PDT 2004
Without -CURRENT debugging in kernel.
MySQL: Ver 4.0.20 for portbld-freebsd5.2 on amd64 (FreeBSD port:
mysql-server-4.0.20)
With mysql-server40.diffs
With libpthreads
BUILD_OPTIMIZED=yes
BUILD_STATIC=yes
---------------------------------------------------------------------
Each benchmark ran 4 times and highest was shown.
---------------------------------------------------------------------
Benchmark results:
REMOTE (Over 100mbit LAN dc0 to bge0):
- Using default mysql config settings (empty/missing my.cnf) w/mysql.sock unc#
- Using SCHED_ULE
devbox# super-smack update-select.smack 30 10000
Query Barrel Report for client smacker
connect: max=18ms min=1ms avg= 6ms from 30 clients
Query_type num_queries max_time min_time q_per_s
select_index 300000 12 0 1672.22
update_index 300000 7 0 1672.22
*Note1: ps -H only shows 1 mysql line during test.
*Note2: vmstat -w 1 ID's ~50 during this test.
- Using default mysql config settings (empty/missing my.cnf) w/mysql.sock unc#
- Using SCHED_4BSD
devbox# super-smack update-select.smack 30 10000
Query Barrel Report for client smacker
connect: max=28ms min=2ms avg= 16ms from 30 clients
Query_type num_queries max_time min_time q_per_s
select_index 300000 7 0 2685.53
update_index 300000 5 0 2685.53
*Note1: ps -H only shows 1 mysql line during test.
*Note2: vmstat -w 1 ID's jump around between 20-50 during this test.
- Using my-huge.cnf w/mysql.sock lines in update-select.smack uncommented
- Using SCHED_ULE kernel
devbox# super-smack update-select.smack 30 10000
Query Barrel Report for client smacker
connect: max=36ms min=1ms avg= 15ms from 30 clients
Query_type num_queries max_time min_time q_per_s
select_index 300000 2 0 2813.09
update_index 300000 10 0 2813.09
*Note1: ps -H only shows 1 mysql line during test.
*Note2: vmstat -w 1 ID's ~12 during this test.
- Using my-huge.cnf w/mysql.sock lines in update-select.smack uncommented
- Using SCHED_4BSD kernel
devbox# super-smack update-select.smack 30 10000
Query Barrel Report for client smacker
connect: max=34ms min=1ms avg= 16ms from 30 clients
Query_type num_queries max_time min_time q_per_s
select_index 300000 4 0 3229.12
update_index 300000 8 0 3229.12
*Note1: ps -H only shows 1 mysql line during test.
*Note2: vmstat -w 1 ID's jump around between 20-50 during this test.
As you can see, so far, the best results on the FreeBSD testing of this AMD64
hardware came from a 32-bit i386 install using MySQL compiled with
Linuxthreads.
Going to try to test Mandrake Linux again next, but I have to reinstall it
first.
More information about the freebsd-amd64
mailing list