Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 2004 10:36:12 -0700
From:      JG <amd64list@jpgsworld.com>
To:        freebsd-amd64@freebsd.org
Subject:   Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?
Message-ID:  <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com>

next in thread | raw e-mail | index | archive | help

Well, I've finally got some initial benchmarks here...

I plan to do many more and encourage anyone who wants to see FreeBSD 
perform better
in these benchmarks to give me tips or suggestions to help boost performance.

The benchmarks were done from a remote server on the LAN, using myBench.
Unfortunately, myBench doesn't seem to simulate actual real-world user loads.
Super-smack does, but I ran into problems compiling it, and then more when 
trying
to use it remotely. Super-smack-1.3 is supposed to be coming out soon, 
hopefully
it will fix some of these problems.

Anyway, on with the benchmark results...


TESTING HARDWARE:

Dual AMD Opteron 240's (1.4ghz)
Tyan S2882UGNR server-class motherboard w/LSI Zero channel Raid card.
2 gigs PC-2700 registered ECC memory
Seagate barracuda ATA 100 system drive
RAID-0 Mysql drive composed of 2 15k RPM U160 SCSI Fujistu drives.


BENCHMARK SUMMARIES:

(I ran the benchmark 5 times for each OS config, highest overall results 
are listed below)

-----------------------------------------------------------------------------
For:

LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation
MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution)
Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 
unknown unknown GNU/Linux

Benchmark results:

Generating 500000 records...
Creation of 500000 records took 89 seconds.
Average of 5617.9775280899 records per second.
Creating records for 10 seconds...
Created 50547 records in 10 seconds.
Average of 5054.7 records per second.
Creating random 50000 md5 hash records.
Creation of 50000 random md5 hash inserts took 9 seconds.
Average of 5555.5555555556 records per second.
Creating random md5 hash records for 10 seconds...
Created 50864 random records in 10 seconds.
Average of 5086.4 records per second.

Your databases overall average score is 5328.6582709114 records per second
-----------------------------------------------------------------------------

For:

FreeBSD  5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004
using  kernel compiled with SCHED_ULE
MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port: 
mysql-server-4.1.1_2)
MySQL Statically compiled with libc_r

Benchmark results:

Generating 500000 records...
Creation of 500000 records took 155 seconds.
Average of 3225.8064516129 records per second.
Creating records for 10 seconds...
Created 29121 records in 10 seconds.
Average of 2912.1 records per second.
Creating random 50000 md5 hash records.
Creation of 50000 random md5 hash inserts took 15 seconds.
Average of 3333.3333333333 records per second.
Creating random md5 hash records for 10 seconds...
Created 33121 random records in 10 seconds.
Average of 3312.1 records per second.

Your databases overall average score is 3195.8349462366 records per second.

-----------------------------------------------------------------------------

For:

FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004
using SCHED_4BSD
MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port: 
mysql-server-4.1.1_2)
MySQL Statically compiled with libc_r

Benchmark results:

Generating 500000 records...
Creation of 500000 records took 164 seconds.
Average of 3048.7804878049 records per second.
Creating records for 10 seconds...
Created 33220 records in 10 seconds.
Average of 3322 records per second.
Creating random 50000 md5 hash records.
Creation of 50000 random md5 hash inserts took 14 seconds.
Average of 3571.4285714286 records per second.
Creating random md5 hash records for 10 seconds...
Created 26428 random records in 10 seconds.
Average of 2642.8 records per second.

Your databases overall average score is 3146.2522648084 records per second.

-----------------------------------------------------------------------------

And I think those Linux results could probably go up more with tweaking 
figuring that was "stock".



So any suggestions on how to improve performance on FreeBSD/AMD64?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.2.0.9.2.20040518103357.04c6cbb8>