Before & After Under The Giant Lock

gregoryd.freebsd at free.fr gregoryd.freebsd at free.fr
Mon Nov 26 01:57:40 PST 2007


Hello,

Quoting Robert Watson <rwatson at FreeBSD.org>:

> No problem -- just to be clear: in 7, users can still choose between
> libpthread (m:n) and libthr (1:1), but the default is now libthr rather than
> libpthread, as libthr seemed to perform better in most if not all workloads
> of
> interest.

I thought 1:1 would perform better with I/O bound processes running several
threads.
But wouldn't a process rely on a few I/O threads for several other CPU bound
threads ? (unless specific activities such as a web server, or a database, which
would explain MySQL performing better with 1:1)

Or, to make my point (somewhat) clearer: how did you actually compare advantages
of 1:1 versus M:N when the change from the latter to the former was decided ?

And second question: would it be possible to dynamically choose one way over the
other: meaning if you know you're mostly I/O bound, then request for the 1:1
type of threads, and vice versa ?

thanks,
gregory


More information about the freebsd-hackers mailing list