From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 12:40:08 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFD6116A4CE for ; Tue, 18 May 2004 12:40:08 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id E797743D7D for ; Tue, 18 May 2004 10:36:31 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 9688 invoked by uid 89); 18 May 2004 17:40:21 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 18 May 2004 17:40:21 -0000 Message-Id: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Tue, 18 May 2004 10:36:12 -0700 To: freebsd-amd64@freebsd.org From: JG Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 19:40:09 -0000 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?