Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jul 2003 20:12:04 -0400
From:      Mike Makonnen <mtm@identd.net>
To:        Petri Helenius <pete@he.iki.fi>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: LinuxThreads replacement
Message-ID:  <20030710001204.GB10504@kokeb.ambesa.net>
In-Reply-To: <006401c3464d$de848a00$812a40c1@PETEX31>
References:  <001b01c3463a$0f907a00$0100a8c0@alpha> <006401c3464d$de848a00$812a40c1@PETEX31>

next in thread | previous in thread | raw e-mail | index | archive | help
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@identd.net | D228 1A6F C64E 120A A1C9  A3AA DAE1 E2AF DBCC 68B9
mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon!



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