From owner-freebsd-stable@FreeBSD.ORG Sat Jun 11 07:26:33 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9F1916A41C for ; Sat, 11 Jun 2005 07:26:33 +0000 (GMT) (envelope-from smartweb@leadhill.net) Received: from natco3.natcotech.com (natco3.natcotech.com [205.167.142.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E51243D1D for ; Sat, 11 Jun 2005 07:26:33 +0000 (GMT) (envelope-from smartweb@leadhill.net) Received: from ibm.nlcc.us (ldhl-ras1-dial-12-28-24-182.natcotech.com [12.28.24.182]) by natco3.natcotech.com (Postfix) with ESMTP id C637C62FD2 for ; Sat, 11 Jun 2005 02:26:31 -0500 (CDT) Received: (qmail 66043 invoked by uid 89); 11 Jun 2005 07:26:31 -0000 Received: from unknown (HELO ?192.168.0.2?) (billy@192.168.0.2) by ibm.nlcc.us with SMTP; 11 Jun 2005 07:26:31 -0000 Message-ID: <42AA9226.3010204@leadhill.net> Date: Sat, 11 Jun 2005 02:26:30 -0500 From: Billy Newsom User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <746fd037f6ca8131a8fb8938f1e346e9@lonres.com> <20050610170537.GA67849@bibipentium.lonres.com> In-Reply-To: <20050610170537.GA67849@bibipentium.lonres.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: FreeBSD MySQL still WAY slower than Linux X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2005 07:26:33 -0000 Steve Roome wrote: > We're using mostly: > > 5.4-STABLE FreeBSD 5.4-STABLE #0: Mon Jun 6 12:22:18 BST 2005 > > This is on a Dell PowerEdge 2850. (2 * 2.8 GHz Xeons, 4GB ram, disks), > we've been keeping up with stable because supposedly all these new > fixes to threading will help us out here. > > We're trying to get FreeBSD to perform reasonably well, in comparison > to Linux, or even what we should expect to see. We're getting about > half the performance we get from gentoo on the same application > (mysql). > [snip] > Thanks in advance for anyone that has a clue on this, and has anyone > figured out why FreeBSD is just so amazingly slow compared to Linux. > Have you looked around for different compilers and/or different compiler options? I was just remembering how different code can be, depending on which gcc, for example, was used, and definitely which optimization. (i.e. Try "gcc -v" on both systems to see if they match; next see if all compiler options match when they are compiling like -march=pentiumpro.) Meanwhile, I have heard good things about compiler "fill in the blank" for whatever. Not too long ago, I remember hearing about people who preferred to use, say, an Intel compiler for certain things. It might be interesting to see if FreeBSD 4.11 is just as slow as 5.x. And try feeding the right compiler flags using /etc/make.conf or its equivalent. You should also think about whether the file systems are mounted using similar, or equally-performing systems. Rumour has it that Linux file systems performance is .... [flame bait mysteriously deleted]... Your benchmark may produce some interesting results, for example, depending on whether it thrashes a disk, or mainly hits memory. Do they perform the same on small sized (cached) lookups and then FreeBSD bogs down on disk throughput, for example? Last, but not least, I have heard some not-so-impressive things about MySQL 4.1 when compared to 4.0. Perhaps the things I heard were in reality specific to FreeBSD, and so by dropping back to 4.0 on a test server, you might see an unexpected performance boost? (Be sure and delete the tables between runs.) 4.0 is still in the ports tree, and I have heard of some who wished they never upgraded to 4.1. But going backwards is not pretty for a live database, so test both versions now. Billy