From owner-freebsd-current@FreeBSD.ORG Thu Feb 10 21:34:56 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 136CA16A4CE; Thu, 10 Feb 2005 21:34:56 +0000 (GMT) Received: from mta13-winn.mailhost.ntl.com (smtpout19.mailhost.ntl.com [212.250.162.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9435643D41; Thu, 10 Feb 2005 21:34:54 +0000 (GMT) (envelope-from antony.t.curtis@ntlworld.com) Received: from aamta02-winn.mailhost.ntl.com ([212.250.162.8]) by mta13-winn.mailhost.ntl.com with ESMTP <20050210213453.VWNF11211.mta13-winn.mailhost.ntl.com@aamta02-winn.mailhost.ntl.com>; Thu, 10 Feb 2005 21:34:53 +0000 Received: from localhost.localdomain ([81.107.94.210]) by aamta02-winn.mailhost.ntl.com with ESMTP <20050210213453.IXFY3760.aamta02-winn.mailhost.ntl.com@localhost.localdomain>; Thu, 10 Feb 2005 21:34:53 +0000 From: Antony T Curtis To: Scott Long In-Reply-To: <420A909C.8070701@freebsd.org> References: <20050209205943.34c39e15.flynn@energyhq.es.eu.org> <420A909C.8070701@freebsd.org> Content-Type: text/plain Date: Thu, 10 Feb 2005 21:34:50 +0000 Message-Id: <1108071290.59338.8.camel@pcgem.rdg.cyberkinetica.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: MySQL benchmarks X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2005 21:34:56 -0000 On Wed, 2005-02-09 at 15:37 -0700, Scott Long wrote: > Miguel Mendez wrote: > > > Hi all, > > > > Someone has posted a link to a newsforge article on the NetBSD lists > > that benchmarks MySQL performance on several systems, you can see it at: > > > > http://software.newsforge.com/article.pl?sid=04/12/27/1243207&from=rss > > > > I don't know how much Linux-specific code there is in MySQL because, > > honestly, I always try to avoid it and go with PostgreSQL, but perhaps > > somebody with more MySQL-fu can fill in the blanks and confirm that the > > better performance seen on Linux systems is due to how the software is > > designed and not so much related to FreeBSD per se. > > > > Cheers, > > There has long been speculation that Linux cuts corners on these tests > by ignoring things like fsync. One thing that I've been meaning to do > for a while is to ktrace some of the mysql benchmarks and see what > exactly is going on, then compare that to a similar ktrace run under > Linux. If it turns out that there are lots of synchronization calls > (i.e. fsync-like calls), try stubbing them out in FreeBSD and see if it > brings you any closer to the linux scores. > > An easier but also informative test would be to remount the database > filesystem as async-noatime-nosoftupdates and see how it compares. The test was performed using Innodb... and if the define is available, it usually opens its filestore with the O_DIRECT flag. Also, expect plenty of fsync() calls. If Linux is returning from the write() calls without pushing the data to disk, that itself will give it a sizable lead. If I remember correctly, MyISAM with skip-locking should rarely use fsync() calls... so if possible, the test could be re-run using MyISAM tables to see if there is any performance difference. I have not personally done any performance comparisons between FreeBSD and Linux in more than a year but the last time I compared FreeBSD 5 pthreads and Linux, Linux does appear to have the edge on thread creation and synchronisation. However, I have switched all my machines to be running FreeBSD since... (rpm hell experience during upgrading) YMMV, opinions are mine and not my employer, yadda yadda yadda... -- Antony T Curtis, BSc. UNIX, Linux, *BSD, Networking antony.t.curtis@ntlworld.com C++, J2EE, Perl, MySQL, Apache IT Consultancy.