Re: what's the different between sched_core.c and sched_ule.c?
- From: conrads@xxxxxxx (Conrad J. Sabatier)
- Date: Tue, 31 Oct 2006 01:05:29 GMT
In article <ei5jim$2454$1@xxxxxxxxxxxxxxxxxxxxxxxx>,
Michel Talon <talon@xxxxxxxxxxxxxxxx> wrote:
bailaohe@xxxxxxxxx <bailaohe@xxxxxxxxx> wrote:
Hello, friends! In the source tree of FreeBSD 7.0 CURRENT, I find a new
file - sched_core.c. I bare in mind that the sched_ule.c contains the
mechanism of ULE scheduling. Then, I wonder, what does this new file
do? Is it a new scheduling method or somewhat a higher level abstrat to
existing scheduling mechanism?
This is a new scheduler, which consists in SCHED_ULE stripped of the
complexities necessary to support libpthread, and aimed at being efficient
with libthr. In other words it has been observed that 1-1 threads in libthr
are much more efficient than N:M threads in libpthread, some heavily threaded
applications like mysql see a performance improvement like 2/1. But
a 1:1 thread system requires a 0(1) scheduler like the Linux one, since
threaded applications (e.g. some Java ones) can create thousands of threads.
But SCHED_ULE is so complicated that no one wants to fix and maintain it.
Hence the idea to simplify drastically all that stuff, remove N:M threads,
as has been done in Solaris and Linux, concentrate on something manageable and
fix the scaling issues in FreeBSD. There is at present a whole discussion on
freebsd-current on this problem. Of course the people who have coded
libpthread are not very happy to see their baby thrown away ...
And I would add that, at least for now, you'd do best to avoid using both
the core *and* ule schedulers. 4bsd is still the old, tried-and-true (and
default) scheduler.
As Michel mentioned, there's quite an involved discussion going on right now
in the current mailing list re: threads and scheduling, and one of the
things that has come up in the course of it is one major flaw in libthr,
namely, that it adds a lot of needless overhead calculating thread
priorities, which it then discards and doesn't even use!
Both ule, and to an even greater degree, core are considered "experimental"
still. Play with them if you like, but do be advised that there's probably
little or nothing to be gained by using either one, at least not yet.
--
Conrad J. Sabatier <conrads@xxxxxxx> -- "In Unix veritas"
.
- Follow-Ups:
- Re: what's the different between sched_core.c and sched_ule.c?
- From: bailaohe@xxxxxxxxx
- Re: what's the different between sched_core.c and sched_ule.c?
- References:
- what's the different between sched_core.c and sched_ule.c?
- From: bailaohe@xxxxxxxxx
- Re: what's the different between sched_core.c and sched_ule.c?
- From: Michel Talon
- what's the different between sched_core.c and sched_ule.c?
- Prev by Date: Re: Network problem
- Next by Date: Re: what's the different between sched_core.c and sched_ule.c?
- Previous by thread: Re: what's the different between sched_core.c and sched_ule.c?
- Next by thread: Re: what's the different between sched_core.c and sched_ule.c?
- Index(es):
Relevant Pages
|
|