From owner-freebsd-stable@FreeBSD.ORG Sun Dec 5 17:44:15 2004 Return-Path: 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 8F6C216A4CE for ; Sun, 5 Dec 2004 17:44:15 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B2E743D58 for ; Sun, 5 Dec 2004 17:44:15 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id iB5HmAYJ093714; Sun, 5 Dec 2004 10:48:11 -0700 (MST) (envelope-from scottl@freebsd.org) Message-ID: <41B348EF.8000903@freebsd.org> Date: Sun, 05 Dec 2004 10:44:15 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040929 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dimitry Andric References: <64353.192.168.0.200.1102263448.squirrel@192.168.0.200> <587369907.20041205175744@andric.com> In-Reply-To: <587369907.20041205175744@andric.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: alex bustamante cc: freebsd-stable@freebsd.org Subject: Re: FreeBSD mysql and threading X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2004 17:44:15 -0000 Dimitry Andric wrote: > On 2004-12-05 at 17:17:28 alex bustamante wrote: > > >>Read somewhere that FreeBSD has some problems with threading and mysql. >>Has this been fixed in 5.x? > > > Somewhere, some problems might sometimes be fixed, so maybe this could > be the case. Unless someone gives exact specifications, someone can > never expect to get exact answers, don't you think? :) I did some extensive tests with mysql over the late summer to investigate domain socket performance and test scheduler bugs. I also wound up testing threading performance as a consequence. The result was that compiling mysqld with the default threading options yields fairly good results and I could run large stress tests for quite a while without problems. The good news is that default option of using KSE (i.e. libpthread) system scope threads performs about as well as Linuxthreads, on an SMP system. Compiling it for KSE process scope threads should have yielded even better performance, but would up being barely half. This could well be due to scheduling bugs since the results were similar to what I got from using libc_r. The only stability issues I encountered were from using SCHED_ULE and PREEMPTION (both together and separately). I haven't run the tests in quite a while, so I can't say whether 6-CURRENT behaves any better now with those options. As for comparing performance to Linux, it's a lot closer now that it was in 5.2, but it hasn't quite caught up yet. There is speculation that Linux might be cheating with filesystem sync operations on the data files and thus avoiding a significant amount of overhead at the cost of safety, but I haven't had a chance to verify this. But I was still able to get 11,000-12,000 local queries per second on a reasonable SMP system, and that's pretty decent. Scott