LinuxThreads replacement

Mike Makonnen mtm at identd.net
Wed Jul 9 17:12:21 PDT 2003


On Wed, Jul 09, 2003 at 10:11:15PM +0300, Petri Helenius wrote:
> >for example, for on database instance, there are about 80 (lthread)
> >processes hanging around.
> 
> I would say with 80 threads you?ll get better performance with libkse
> since you?ll get less contention on the process scheduler.
> 

It's not as simple as that. In practice a lot of factors about
your system and the type of work you're doing will affect the
performance. On paper, the SA/KSE method is supposed to combine
the best aspects of 1:1 (libthr) and N:1 (libc_r), and should
threoretically be "better" than either one. But, in practice,
complexity and overhead may drown out the performance gains.
Conversely, context switching overhead may not be as great a
penalty for the 1:1 model on modern cpus.

I don't want to get in a flamewar over this. I just wanted to point
out that it's not as simple as "contention on the process
scheduler." I think what we need, now that both libthr and libkse
are somewhat useable, is some benchmarking comparisons.

If you have the time I think we would all be interested to see
any performance comparisons you can run with your application.
Once you compile the application switching threads libraries is as
simple as editing /etc/libmap.conf.


Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm at identd.net | D228 1A6F C64E 120A A1C9  A3AA DAE1 E2AF DBCC 68B9
mtm at FreeBSD.Org| FreeBSD - Unleash the Daemon!


More information about the freebsd-threads mailing list