Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Dec 2000 00:54:01 -0800
From:      "David Schwartz" <davids@webmaster.com>
To:        "Noor Dawod" <noor@comrax.com>
Cc:        <stable@freebsd.org>
Subject:   RE: MySQLd not using both CPUs
Message-ID:  <NCBBLIEPOCNJOAEKBEAKOEADMGAA.davids@webmaster.com>
In-Reply-To: <PHEBIOJOBJJLIIJCOINKEEDHCPAA.noor@comrax.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NCBBLIEPOCNJOAEKBEAKOEADMGAA.davids>