This is a significant milestone to be shared with everyone! Khairil Yusof reports that libkse is now running quite well on his FreeBSD 5.1+ current based SMP system. He has tested a bunch of apps on his system, taking the approach of enabling kse one app at a time. Read more at FreeBSDForums.
KSE Progress on FreeBSD SMP Environment
About The Author
Eugenia Loli
Ex-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker.
Follow me on Twitter @EugeniaLoli
14 Comments
“However, development stopped once it was clear that NPTL was superior:
http://www-124.ibm.com/pthreads/docs/announcement
The rest of your post is a combination of wishful thinking and utter rubbish.”
I read the same article you linked and nowhere inside the article do they say that NPTL was superior. In fact, they state the reason for stopping was that “[they] don’t want to split the community to choose one over the other.” It is quite clear why Linux chose the simpler method; it lacks the centralized infrastructure that would be able to push for the better, yet more complex, design. I think you are the one doing the wishful thinking.
“It is quite clear why Linux chose the simpler method; it lacks the centralized infrastructure that would be able to push for the better, yet more complex, design. I think you are the one doing the wishful thinking.”
Seems you don’t understand that linux is a kernel, and FreeBSD is an operating system. Linux supports whatever threading library you choose to use
Interesting logic though completely ignorant. The glibc camp (read GNU, namely Drepper, Jelinek, Molnar and others) decided that a high end thread library did not necessarily need the extra layer of scheduling required for an M:N implementation, they went for a 1:1 implementation. The reasons for having a M:N implementation were, among others, being able to have a massive number of threads. Russell and Molnar came up with a linux kernel primitive mutex,.. a fast user mutex, a futex, which could allow a 1:1 implementation like nptl to scale much higher. M:N and 1:1 thread implementations are different,. and have advantages in different areas. Both FreeBSD and Linux should support both, (though linux has had it for a while now and fbsd is just getting it.) Your arguments painting fbsd into the M:N camp and linux as a kernel into the 1:1 camp is a case of misguided zealot logic. You are a troll.
Those who claim that linux lacks a central structure do not look hard enough. There is no ‘core’ team for linux, or a team of release managers, and there are far more frequent releases of the linux kernel and associated userspace. This has advantages and disadvantages vs. the BSD style of development. To say that there is no centralised structure at all is ignorant at best, lies in truth.
There’ve always been a fairly quiet group of core developers working on linux. Some come and go,. and maybe didn’t have a shiny membership card and prestigious email address to some ‘core’ group. The effects of their collective contributions though, _are_ being felt nonetheless.
Think about it. Name five freebsd developers. Now name five linux kernel developers. Then name five GNU binutils/glibc/coreutils/gcc developers.
I’m betting that those of you trolling this forum don’t pay enough attention to the developments in either FreeBSD or Linux (kernel and otherwise) development. Perhaps you should.
A hybrid approach, the sort Sun has moved away with in Solaris 9 for performance reasons. Linux too, NPTL over LGPT (was that what it was called?) for performance reasons. Still, this outa be better then what they currently use. I wish them luck. Can’t wait until FBSD 5 is complete, benchmarks with it and Solaris 9 and Linux 2.6 outa be very, very interesting.
As a FreeBSD user and Malaysian, I feel proud to see this new development of KSE. I’m waiting the KSE project to be completed and implemented in 5.x.
FreeBSD has now also a (experimental) 1:1 threads implementation similar to what Solaris 9 and Linux use. You have the choice! libmap.conf allows you to choose different threading libraries for different applications. When they mature a bit it will be very interesting to do performance comparsions on the same operating system between these different threading implementations.
Free software power!
The hybrid approach should function better in practice. The hybrid has most of the advantages of both and few of the disadvantages of either. It seems a matter of putting theory in practice, and that’s something BSD has traditionally been good at.
“The hybrid has most of the advantages of both and few of the disadvantages of either.”
Sun once said the same thing, until they found costumers were using the 1:1 approach far more often for performance reasons. Now Solaris 9 ships with only it. Still, if FBSD can pull it off then kick ass. I wish them luck.
System jobs should always run in 1:1 so system task can be taken care of (IO, Cache control, Virtual Memory, …).
If you’re running a system like mine at work which normally has around 1600 jobs running on all day, then user jobs should be scheduled using 1:N. This allows the system priorties jobs on a per job bases. If the user land is running 1:1, then each thried in a a job is treated as a new program. If my job is not running fast enough for me, I just create a new thried and I get more of the CPUs time; this is the wrong approch when the number of jobs in creases and makes coharent job scheduling next to imposiable.
Please not that Linux kernel is being readied for workstations and desktops (per Linus). Thus the 1:1 job scheduler is all that is needed since most desktops seldom run more then about 100 jobs (deamons and damons count).
The man advantages to 1:N is not noticed until you move into a more batch type system. IE: reports and long running tasks are passed off into a background task leaving the user free to do something else. Since each background task is handled by a program, this would be the same so doing a spawn() in Linux. If you run a larger server with 200 users and allow each user to spawn() 10 reports, then expect the system to become so unresponse as to be unusedable. In a batch system, you don’t directly spawn() the report program, but instead submit a request to run the program to a scheduling deamon which will then allow a limited number of reports to run; this lets the system administator control the number of programs running and lets him keep the interactive programs running with a reasonable response time.
Now, all FreeBSD needs is a scheduling deamon and someone to convince the programmers to use it. Just think, a FreeBSD server with several hundred dumb terminals that is still responsive to the users while the CPUs are maxed out at 100%.
The hybrid approach should function better in practice. The hybrid has most of the advantages of both and few of the disadvantages of either.
And yet Sun, who had an MxN implementation for _years_, ditched that approach when they found that it was nigh impossible to properly debug, and instead replaced it with a 1:1 implementation which actually outperformed the MxN one.
And here’s Ingo Molnar’s (one of the two programmers of Linux’ NPTL) somewhat in-depth thoughts on the issue:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103284879216107&w=2
Just because Sun and Linux have failed in their attempt to create this hybrid does not neccesarily indicate that FreeBSD will.
Linux hackers will always try to say such solution is too complex to do any good. This is the classic Linux lie for all solutions until they are able to do the same thing. The said truth is that Linux lacks the central organization to undergo such a drastic change in the kernel. Linux works only in evolutionary terms. It will never be able to undergo such a complex project that radically changes the entire kernel because of it’s distributed development approach. On the otherhand, FreeBSD has a very strong central administration, and has been able to redesign their entire kernel around this and has been able to make everyone work with these changes in mind.
In the case of Sun, Sun is limited to live in the business world. They definately acknowledged that there is a definite advantage to this hybrid approach, and this is the reason that they spent so much R&D and effort trying to do it. But due to business, fiscal, and competitive pressures, they were forced to adopt the simpler approach. They could not afford to be where FreeBSD is and still compete with HP and Sun on 100 cpu systems. They were forced to adopt the simpler method and like any other company in their shoes would, advertise it as the better solution.
I absolutely agree. Linux kernel development does not occur with planning. And Linus himself bashed such efforts once:
http://kerneltrap.org/node.php?id=11&PHPSESSID=86f9e54ec7cecc5d6fe1…
So he essentially believes if you do any planning you’re doomed.
Surely IBM, SGI, Red Hat etc. probably are more organized and commit code that is planned in advance. But usually linux development works in terms of successive hacks. Whereas FreeBSD has potential to bring this about. And if they believe M:N model will theoretically perform better and invest in that project with code, I have good reasons to believe it would. Because BSD guys know what they’re doing. No linux bashing intended but that’s the case.
The said truth is that Linux lacks the central organization to undergo such a drastic change in the kernel. Linux works only in evolutionary terms. It will never be able to undergo such a complex project that radically changes the entire kernel because of it’s distributed development approach.
It seems you’re not aware of the fact that Linux ALREADY HAS a M:N posix threading implementation!:
http://www-124.ibm.com/pthreads/
However, development stopped once it was clear that NPTL was superior:
http://www-124.ibm.com/pthreads/docs/announcement
The rest of your post is a combination of wishful thinking and utter rubbish.