From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 16:51:49 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 3F70016A4CE for ; Wed, 19 May 2004 16:51:49 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20BE343D1D for ; Wed, 19 May 2004 16:51:49 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 73582 invoked by uid 89); 19 May 2004 23:54:43 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 23:54:43 -0000 Message-Id: <5.2.0.9.2.20040519164844.01521620@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 19 May 2004 16:50:22 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <200405191211.25786.peter@wemm.org> References: <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <20040519172913.GU601@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: 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: Wed, 19 May 2004 23:51:49 -0000 > > >Actually, the patch was the other way around. mysqld was running into >limits of system scope threads, so the port has patches to turn it into >process scope. It might be worth deleting the file from the port and >rebuilding, just to see what happens. More benchmarks: ----------------------------------------------------------------------------- FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 (-CURRENT above has ULE + KSE patch applied) With SCHED_ULE & debugging turned off in kernel. MySQL Ver 4.0.20 for portbld-freebsd5.2 on amd64 (FreeBSD port: mysql-server-4.0.20) with mysql40-server.diffs patch applied Port options: BUILD_OPTIMIZED=yes BUILD_STATIC=yes Compiled with libpthreads BENCHMARK RESULTS: Generating 500000 records... Creation of 500000 records took 174 seconds. Average of 2873.5632183908 records per second. Creating records for 10 seconds... Created 31407 records in 10 seconds. Average of 3140.7 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 20 seconds. Average of 2500 records per second. Creating random md5 hash records for 10 seconds... Created 25780 random records in 10 seconds. Average of 2578 records per second. Your databases overall average score is 2773.0658045977 records per second. ------- VMstat while running the first 20 seconds or so of the above benchmark (the entire benchmark takes ~4-5 mins to complete) $ vmstat -w 1 procs memory page disks faults cpu r b w avm fre flt re pi po fr sr ad0 am0 in sy cs us sy id 1 0 0 79952 1471012 2305 0 0 0 2015 0 0 0 2439 2132 3228 10 3 87 0 0 0 79952 1471012 9 0 0 0 0 0 0 0 2209 134 2166 0 0 100 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2200 116 2145 0 0 100 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2202 128 2157 0 0 100 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2200 116 2146 0 2 98 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2197 119 2145 0 0 99 0 0 0 79952 1471012 0 0 0 0 0 0 3 0 2206 123 2165 0 0 100 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2196 133 2145 0 2 98 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2198 124 2149 0 0 100 0 0 1 80080 1470696 6 0 0 0 4 0 0 0 11144 41239 28287 4 26 70 0 0 1 80080 1470376 0 0 0 0 0 0 0 0 16249 63630 43136 7 38 55 0 0 1 80080 1470056 0 0 0 0 0 0 0 0 15987 63224 42348 9 40 51 0 0 1 80080 1469720 0 0 0 0 0 0 0 0 16009 63758 42743 7 39 54 1 0 0 80080 1469400 0 0 0 0 0 0 0 0 15924 63779 42576 6 43 51 0 0 1 80080 1469064 0 0 0 0 0 0 0 0 16229 63525 43043 10 34 56 0 0 1 80080 1468744 0 0 0 0 0 0 0 0 15939 63532 42429 10 39 52 0 0 1 80080 1468408 0 0 0 0 0 0 0 0 16219 63701 43133 7 39 54 0 0 1 80080 1468088 0 0 0 0 0 0 0 0 15929 63655 42514 10 37 53 0 0 1 80080 1467752 0 0 0 0 0 0 0 0 16267 63411 43040 8 38 55 0 0 1 80080 1467448 0 0 0 0 0 0 0 0 15897 61412 41747 7 41 53 0 0 1 80080 1467112 0 0 0 0 0 0 0 0 16293 63671 43329 7 40 53 0 0 1 80080 1466792 0 0 0 0 0 0 0 0 16091 63579 42755 6 38 55 0 0 1 80080 1466472 0 0 0 0 0 0 0 0 16140 62336 42551 6 42 52 0 0 1 80080 1466136 0 0 0 0 0 0 0 0 15933 63654 42569 9 35 56 0 0 1 80080 1465816 0 0 0 0 0 0 0 0 15932 63689 42610 6 41 53 0 0 1 80080 1465496 0 0 0 0 0 0 0 0 16214 63570 43037 9 39 52 0 0 1 80080 1465160 0 0 0 0 0 0 0 0 15927 63784 42542 9 40 51 0 0 1 80080 1464840 0 0 0 0 0 0 0 0 15930 63751 42577 7 40 53 0 0 1 80080 1464504 0 0 0 0 0 0 0 0 15925 63669 42552 7 38 55 0 0 1 80080 1464184 0 0 0 0 0 0 1 0 15713 62515 41810 7 39 54 2 0 0 80080 1463864 339 0 0 0 231 0 0 0 15933 63646 43080 8 39 53 0 0 1 80080 1463528 0 0 0 0 0 0 0 0 16252 63792 43174 9 36 55 0 0 1 80080 1463208 0 0 0 0 0 0 0 0 16072 61651 42040 7 38 55 0 0 1 80080 1462888 0 0 0 0 0 0 3 0 15950 63525 42471 9 41 50 0 0 1 80080 1462568 0 0 0 0 0 0 0 0 16180 63925 43120 8 40 52 0 0 1 80080 1462232 0 0 0 0 0 0 4 0 15932 63626 42567 6 40 54 0 0 1 80080 1461912 0 0 0 0 8 0 4 0 15953 63424 42389 9 38 53 0 0 1 80080 1461576 0 0 0 0 0 0 0 0 15925 63610 42420 8 39 53 0 0 1 80080 1461256 0 0 0 0 0 0 0 0 15949 63724 42611 8 36 55 0 0 1 80080 1460936 0 0 0 0 4 0 0 0 15860 63235 42289 10 35 55 0 0 1 80080 1460600 0 0 0 0 0 0 0 0 15957 63481 42465 8 43 49 0 0 1 80080 1460280 0 0 0 0 0 0 0 0 15933 63744 42539 7 40 53 0 0 1 80080 1459944 0 0 0 0 0 0 0 0 15947 63791 42621 5 40 54 0 0 1 80080 1459624 0 0 0 0 0 0 0 0 16079 63462 42704 6 39 55 0 0 1 80080 1459304 0 0 0 0 0 0 0 0 16141 61707 42287 9 38 53 0 0 1 80080 1458968 0 0 0 0 0 0 0 0 15932 63744 42606 8 37 55 0 0 1 80080 1458648 0 0 0 0 0 0 0 0 15955 63724 42569 10 35 55 VS. ----------------------------------------------------------------------------- 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 result summary: 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 ----------------------------------------------------------------------------- Is SMP _really_ working for FreeBSD/AMD64? Nothing I do seems to improve the FreeBSD benchmarks here.