Date: Tue, 18 May 2004 12:54:23 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: JG <amd64list@jpgsworld.com> Cc: freebsd-amd64@freebsd.org Subject: Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64? Message-ID: <20040518195423.GA23164@Odin.AC.HMC.Edu> In-Reply-To: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 18, 2004 at 10:36:12AM -0700, JG wrote: >=20 > Well, I've finally got some initial benchmarks here... >=20 > I plan to do many more and encourage anyone who wants to see FreeBSD=20 > perform better > in these benchmarks to give me tips or suggestions to help boost=20 > performance. >=20 > The benchmarks were done from a remote server on the LAN, using myBench. > Unfortunately, myBench doesn't seem to simulate actual real-world user=20 > loads. > Super-smack does, but I ran into problems compiling it, and then more whe= n=20 > trying > to use it remotely. Super-smack-1.3 is supposed to be coming out soon,=20 > hopefully > it will fix some of these problems. >=20 > Anyway, on with the benchmark results... >=20 >=20 > TESTING HARDWARE: >=20 > 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. >=20 >=20 > BENCHMARK SUMMARIES: >=20 > (I ran the benchmark 5 times for each OS config, highest overall results= =20 > are listed below) >=20 > -------------------------------------------------------------------------= ---- > For: >=20 > 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=20 > unknown unknown GNU/Linux >=20 > Benchmark results: >=20 > 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. >=20 > Your databases overall average score is 5328.6582709114 records per second > -------------------------------------------------------------------------= ---- >=20 > For: >=20 > 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:=20 > mysql-server-4.1.1_2) > MySQL Statically compiled with libc_r >=20 > Benchmark results: >=20 > 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. >=20 > Your databases overall average score is 3195.8349462366 records per secon= d. >=20 > -------------------------------------------------------------------------= ---- >=20 > For: >=20 > 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:=20 > mysql-server-4.1.1_2) > MySQL Statically compiled with libc_r >=20 > Benchmark results: >=20 > 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. >=20 > Your databases overall average score is 3146.2522648084 records per secon= d. >=20 > -------------------------------------------------------------------------= ---- >=20 > And I think those Linux results could probably go up more with tweaking= =20 > figuring that was "stock". >=20 >=20 >=20 > So any suggestions on how to improve performance on FreeBSD/AMD64? The obvious place to start would be to use ANY threading libarary other then libc_r. Any of libpthread, libthr, or linuxthreads should yeild significantly better performance. You may need to upgrade to -CURRENT for those to work though. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --KsGdsel6WgEHnImy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAqmnuXY6L6fI4GtQRAloAAJ4t9YIqX//sIfndn/xN027z1bPs4ACfX3zq OAY0IvwqDzOcNs8lpApQG2U= =+pVI -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040518195423.GA23164>