Date: Mon, 10 Jan 2000 17:08:22 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Scott Hess <scott@avantgo.com>, freebsd-hackers@FreeBSD.ORG, developer@lists.mysql.com Subject: Re: Concept check: iothreads addition to pthreads for MYSQL+FreeBSD. Message-ID: <20000110170822.J9397@fw.wintelcom.net> In-Reply-To: <200001102336.PAA31453@apollo.backplane.com>; from dillon@apollo.backplane.com on Mon, Jan 10, 2000 at 03:36:23PM -0800 References: <1a6101bf5bc1$4e364b20$1e80000a@avantgo.com> <200001102336.PAA31453@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Matthew Dillon <dillon@apollo.backplane.com> [000110 16:04] wrote: > :Recently I was tasked to find a way to scale up our MYSQL server, running > :MYSQL3.22.15 on FreeBSD3.3. I've been testing a hardware RAID solution, > :and found that with 6 disks in a RAID5 configuration, the system was only > :perhaps 30% faster than when running on a single disk. [The 6 disks in the > :RAID5 are the same model as the single-disk test I was comparing against.] > : > :Experimentation determined that pthreads was the problem. FreeBSD's > :implementation of pthreads using a select() loop, and select() always says > :that disk I/O is ready to proceed, and disk I/O never return EWOULDBLOCK. > :Essentially, pthreads was serializing the MYSQL read() requests, and if the > :dataset exceeds memory size, performance becomes entirely seek bound. > : > :I've implemented a rough fix, which is to rfork() processes which I label > :... > :Thanks, > :scott > > A better solution may be to shift to FreeBSD4.0 (when it's released - > wait for it to become good and stable), and then use the native > linuxthreads port (/usr/ports/devel/linuxthreads) for FreeBSD. > > The linuxthreads port is at least four times faster and, since it uses > rfork(), will be I/O optimal. However, since only FreeBSD-4.x implements > rfork(...RF_MEM) you can only use it with FreeBSD-4.x (or am I wrong > there?). I'm pretty sure RF_MEM doesn't work in 3.x with SMP, under UP it should work fine. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000110170822.J9397>