From owner-freebsd-threads@FreeBSD.ORG Fri May 21 21:05:35 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1164D16A4CE for ; Fri, 21 May 2004 21:05:35 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB9CC43D3F for ; Fri, 21 May 2004 21:05:34 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i4M45V8Q024017; Sat, 22 May 2004 00:05:31 -0400 (EDT) Date: Sat, 22 May 2004 00:05:31 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: JG In-Reply-To: <5.2.0.9.2.20040521154458.01627688@127.0.0.1> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: Why is MySQL nearly twice as fast on Linux? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 04:05:35 -0000 On Fri, 21 May 2004, JG wrote: > > We have a rather long discussion brewing over at the freebsd-amd64 mailing > list: > > Subj: > Why > is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64? > > @ http://lists.freebsd.org/pipermail/freebsd-amd64/2004-May/thread.html > > > Chris Elsworth also just posted a similar message on the MySQL general > users list: > http://lists.mysql.com/mysql/165908 > > > > I have been benchmarking many different configurations for several days now, > and MySQL under Linux consistently SIGNIFICANTLY outperforms FreeBSD on the > same hardware. > Most of the time handling twice as many queries or more. We are more concerned about correctness right now than speed. There are some optimizations that can be made WRT low-level locking (for instance using cmpxchg when possible). The kernel also still has some more work WRT locking. Also, the default kernel configuration with WITNESS and INVARIANTS adds overhead. Yet another also, MySQL uses scope system threads by default instead of scope process threads. Scope process threads seem to perform better. http://people.freebsd.org/~deischen/mysql40-server.diffs You can also build mysql with LinuxThreads under FreeBSD and see if it performs any better. If it is comparable, that would tend to point to the kernel as the limiting factor. -- Dan Eischen