From owner-freebsd-stable Sun Dec 10 0:54: 4 2000 From owner-freebsd-stable@FreeBSD.ORG Sun Dec 10 00:54:02 2000 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from shell.webmaster.com (unknown [209.10.218.74]) by hub.freebsd.org (Postfix) with ESMTP id 061DC37B400 for ; Sun, 10 Dec 2000 00:54:02 -0800 (PST) Received: from whenever ([216.152.68.2]) by shell.webmaster.com (Post.Office MTA v3.5.3 release 223 ID# 0-12345L500S10000V35) with SMTP id com; Sun, 10 Dec 2000 00:52:55 -0800 From: "David Schwartz" To: "Noor Dawod" Cc: Subject: RE: MySQLd not using both CPUs Date: Sun, 10 Dec 2000 00:54:01 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-reply-to: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > And from your experience, can the LinuxThreads take place of the > pthreads library in all aspects? Yes. > Will all programs support it, that is, > like it does with pthreads? Almost. LinuxThreads has a few places where it's not fully POSIX compliant. IMO, the libc_r pthreads implementation is worse in this respect, but the incompatabilities are different. However, it should be possible without too much difficulty to get any program that works with LinuxThreads on Linux to do so on FreeBSD. The hard part may be getting the program to recognize that it's on FreeBSD (and thus may need certain FreeBSD-specific tweaks) but is using LinuxThreads (and should therefore be ready for true multithreading and workaround LinuxThreads-specific issues). > I am asking because I also use mysqld, and > if you say that LinuxThreads is better, then I'd start using it and > check if it indeed utilizes the system better than pthreads.... It should definitely work better for the following reasons: 1) A single process can run on more than one CPU. 2) Multiple I/O operations can be pending. The whole process won't be stuck waiting a file to be read. 3) The program will be less vulnerable to ambush, say due to page faults with a busy disk queue. However, there is at least one caveat -- each thread will show as a process in tools like 'ps', which can be disconcerting. You may also need to raise the limit on the number of processes you can have, because to the kernel, each thread is a process. > If you have any other tips about mysqld and LinuxThreads, please share > it (even off the list.) My recollection is that MySQLd works perfectly with LinuxThreads on Linux. There should be no reason it should be any different on FreeBSD. The trick will be getting the configuration right. Be sure to read the 'README.FreeBSD' file included with the LinuxThreads port. Also, make sure you have the latest kernel build from the 4-STABLE branch. There were lots of file descriptor sharing issues. In fact, I fear there may still be a few. DS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message