From owner-freebsd-database Tue Jun 13 17:36:48 2000 Delivered-To: freebsd-database@freebsd.org Received: from magnesium.net (toxic.magnesium.net [207.154.84.15]) by hub.freebsd.org (Postfix) with SMTP id A60D937BD06 for ; Tue, 13 Jun 2000 17:36:46 -0700 (PDT) (envelope-from jasone@magnesium.net) Received: (qmail 40642 invoked by uid 1142); 14 Jun 2000 00:36:46 -0000 Date: 13 Jun 2000 17:36:46 -0700 Date: Tue, 13 Jun 2000 17:36:10 -0700 From: Jason Evans To: Paul Walsh Cc: freebsd-database@freebsd.org Subject: Re: FW: Thread issues on FreeBSD 3.4/4.0 with MySQL Message-ID: <20000613173610.J47268@blitz.canonware.com> References: <015301bfd509$848b3200$7bd1c8c2@nationnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <015301bfd509$848b3200$7bd1c8c2@nationnet.com>; from paul@walshsimmons.co.uk on Tue, Jun 13, 2000 at 08:32:23AM +0100 Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jun 13, 2000 at 08:32:23AM +0100, Paul Walsh wrote: > Hi > > Could anybody comment on the following - we are trying to get a pretty busy > MySQL server optimised on FreeBSD4.0 having switched from 3.4 after reading > on the MySQL list: > > "if decide to go with FreeBSD, be sure to install the latest 4.0 > release as 3.x releases had quite some problems with thread libraries. " > > and receiving the comments below from Scott Hess Scott's comments bring up a definite issue with FreeBSD's libc_r with regard to databases. libc_r is a userland library that does call conversion to avoid blocking in the kernel. Unfortunately, this isn't possible for "fast devices", which is what hard drives are considered. There isn't a good fix for this in libc_r; it's a design limitation of userland threading. There is another option, however. There is the linuxthreads port, which is a port of the LinuxThreads package normally associated with GNU libc. This threads package uses clone() (actually a special form of rfork() call on FreeBSD) to run one thread per process. With some tuning, you can probably make this threads package scale reasonably to multiple processors/disks. I've recently updated this port to the most recent released version of LinuxThreads. The port should be 100% compatible with LinuxThreads as they run on Linux, except that I did not take the time to make the gdb hooks work. As for the future, we're working on a replacement for libc_r that will be a first class threads implementation. This will probably be done for FreeBSD 5.0, but that doesn't help in the short term, which is why I recommend the linuxthreads port. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message