nptl - is it beneficial and is it worth it?


Recommended Posts

Hey,

I've been doing some reading lately and I just found out about nptl. Unfortunately, the details for it are a little technical. What I'm wondering, is if its beneficial? If so, what are the benefits? I see that it allows the kernel to do all the scheduling and that parts of it have been optimized - is this noticable on the desktop?

Also, I'm wondering if its worth it - will I need to recompile much of my system in order to use nptl? Also, are there certain apps that don't work with nptl?

Thanks much

Link to comment
Share on other sites

My system is so fast with NPTL. It is much more responsive than before. As another Gentoo user said, there is as much of a difference between going from non-nptl to nptl as there is when going from 2.4 to 2.6, and I think that is true. It does require the 2.6 kernel headers which are masked, but all you have to do is add your arch to the KEYWORDS in the ebuild. I did find that...uhhh...I'd say about 2 apps didn't compile the first time with NPTL, but they were easy fixes IIRC. I did do a complete reinstall of Gentoo for NPTL, but then again I have a lot of time on my hands. People have said that they just do glibc and I think gcc and it worked. Pretty much any app that has the nptl use flag should be reconfigured. "emerge -epv world | grep nptl" to see what you should recompile. Play around with it!

Link to comment
Share on other sites

Well, since i've recompiled glibc, gcc, and binutils, as well as upgrading to an mm-patched 2.6.2-pre kernel, and prelinked everything, my box is flying, but I can't really say exactly which one of these has made the difference (to be honest, its not a massive difference, but this box was fairly snappy to begin with).

So yeah, I'd recommend it... just be careful to recompile your base stuff (glibc, gcc, binutils) and make sure you're running a recent kernel, because before i finished doing that, some of my apps were segfaulting on me.

Link to comment
Share on other sites

From my understanding the big advantage is when you are running lots of threads. More usefull for servers than the desktop. It scales better and creates threads faster. Still a good idea if you are desktop user because it doesn't hurt anything and its kinda cool.

Link to comment
Share on other sites

Awesome, performance upgrades are always nice, even if they only work with some Java apps (like I read on the gentoo forums, thanks for pointing me there static void :) ). I'll be installing this later.... just gotta recompile kernel with nptl, install linux-headers, add nptl to use flags, emerge glibc, gcc, binutils, wine as far as I can tell... I'll leave it on overnight.

Rezza, your post reminded me of something that's been bugging me for a while. I've tried using prelink according to the gentoo prelink guide on their site (prelink -afmR) and it runs for a few minutes, erroring on every single kde binary, but it *appears* to be working on other binaries. Unfortunately though, I don't notice the speed increase in startup time. I've left my prelink.conf file to be auto-generated by portage as it tells me to. Is this just happening because prelinking just doesn't work well/isn't very noticable on my computer, or am I doing something wrong?

Thanks for the help you guys =)

Link to comment
Share on other sites

yeah MG-Cloud, I had the same thing happen the first time I used it... now I just make sure it doesn't try to preling anything from /opt or anything to do with KDE. It does improve startup times of some apps, but not by all that much. Firebird/thunderbird, abiword, xchat-2, etc are a few which are a bit quicker to open.

Link to comment
Share on other sites

Ah, I see. Thanks rezza. I probably just didn't notice the improvement (because I prelinked right after school, a few hours after I had looked at my computer last... it probably felt the same, but was just a little faster).

Also, I think my project for tonight's gonna be nptl then, because frikkin mozilla-firebird-cvs refuses to work :D

Just a quick couple of questions though -

Do i recompile the kernel with nptl support first? If so, do I need to reboot with the updated kernel (and will it work even though my glibc/gcc is not nptl enabled?). Eg. Which comes first?

If it doesn't work, all I need to do is revert back to the old kernel and recompile gcc glibc and binutils without nptl, correct?

Thanks much

Link to comment
Share on other sites

erroring on every single kde binary
that's because you gotta re-compile it with -fPIC in your cflags.
Two questions: 1) What's nptl and 2) What does it do?

1) Native POSIX Thread Library

2) Long story very short: It manages threads

A thread is like a task.

Link to comment
Share on other sites

Thanks goalie - I'll keep that in mind for my next emerge of kde (i don't really use kde all that much, it's only installed for me to toy around with :p). Is the -fPIC flag smart to use with other packages as well?

Oh, and just wondering about any answers to my questions above :D Doh, I know it hasn't been long since I posted, but I'm bored atm ;)

Thanks !

Link to comment
Share on other sites

Well, got mozilla-firebird-cvs working. Awesome. It's much better than 0.7 =)

Was doing a little more research on nptl and found out that ... basically, I apparently don't even need to recompile my kernel. I was sure I saw an NPTL option in there before, but I just took a look at it and couldn't find it again.

So basically then, i just need to install linux-headers, glibc, gcc, binutils w/ nptl, nvidia-glx (heard that you need to re-emerge it), and various stuff that has the nptl USE flag. This seems about right to me, but am I missing something? ;)

Also, it's possible to revert without damaging too much stuff, is it not?

Thanks guys. Sorry for asking so many questions ;)

Link to comment
Share on other sites

Well i can't really tellyou any thing other than I use it :-P. Why? well i used Foedora Core 1 and it is used in there, could some one PLEASE tell me why i should use it and if i should use it when i upgrade my Kernel to (from Foedra Default) to 2.6.2

Link to comment
Share on other sites

If it's already enabled, you should keep it enabled. If you want a technical explanation of nptl (maybe you will have more luck with it than I did), you can try: http://people.redhat.com/drepper/nptl-design.pdf

Well, I went ahead and took the plunge... recompiled glibc, gcc, binutils with the nptl useflags enabled, as well as any other packages that have the flag. Rebooted, and everything seems to be working fine. Is there any indication I can use to check to see if it's actually working though? ;-)

Thanks!

EDIT:

Thought I'd add this:

U I [ Found these USE variables in : sys-libs/glibc-2.3.3_pre20040117 ]
 + + nls   : unknown
 - - pic   : unknown
 - - build : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping.
 + + nptl  : unknown

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.