From owner-freebsd-threads@FreeBSD.ORG Sat May 22 05:43:51 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 5F75516A4CE for ; Sat, 22 May 2004 05:43:51 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15E4F43D45; Sat, 22 May 2004 05:43:51 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from freebsd.org (davidxu@localhost [127.0.0.1]) i4MChJjW025240; Sat, 22 May 2004 05:43:21 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <40AF4A8D.4020602@freebsd.org> Date: Sat, 22 May 2004 20:41:49 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040522 X-Accept-Language: en-us, en MIME-Version: 1.0 To: JG References: <5.2.0.9.2.20040521154458.01627688@127.0.0.1> <5.2.0.9.2.20040521215952.0166c368@mail.ojoink.com> In-Reply-To: <5.2.0.9.2.20040521215952.0166c368@mail.ojoink.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 12:43:51 -0000 I suggest you to do file system benchmark first, I suspect -CURRENT file system's performance is far behind than Linux. David Xu JG wrote: > > > >After reading the posts at the mailing lists mentioned above, > >Do you have any suggestions or ideas as to what the problem is? > > >> 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. > > > As stated in the benchmark results, WITNESS and INVARIANTS > was disabled. Someone else brought that up very early on. > > >> 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 > > > Again, this patch was already made. > It did next to nothing performance wise for MySQL. > > >> You can also build mysql with LinuxThreads under FreeBSD >> and see if it performs any better. > > > LinuxThreads is not available for FreeBSD/AMD64. > > However, as reported on the freebsd-amd64 thread list archive, > sadly, the best configuration turned out to be running this 64-bit AMD64 > hardware in 32-bit mode under _i386_ FreeBSD rather than FreeBSD/AMD64 > with mysql compiled with linuxthreads -- and those results were still > very poor > compared to a "out of the box" Linux + mysql install. > >> If it is comparable, >> that would tend to point to the kernel as the limiting >> factor. > > > There is a significant improvement when using LinuxThreads vs > libpthreads or libc_r, others have reported no difference with libthr > as well. > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to > "freebsd-threads-unsubscribe@freebsd.org" > >