[M3devel] userthreads vs. pthreads performance?
Mika Nystrom
mika at async.async.caltech.edu
Sun Mar 28 18:24:24 CEST 2010
In my tests, programs that acquire a lot of locks (even uncontended ones,
I think) run much much faster with user threads than with kernel threads.
Or at least they run much (several times) faster compiled with an ancient
PM3 than with a recent CM3, and I'm pretty sure the threading is the
main difference. (Given that the effect only occurs for programs that
acquire a lot of locks.)
Mika
=?UTF-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:
>CVSup w/ user threads is not faster because user threads are faster - it
>is faster because it's buggy behaviour manifests only with kernel
>threads. IMO.
>
>Algorithm-wise - at least on Linux NPTL is O(1) decision making time, ie
>switching threads. User threads are lots of linear list walking. Figure
>how efficient it is. Process management "science" has gone long way
>since "founding fathers" did user threads thingy.
>
>d
>
>On Sun, 2010-03-28 at 09:58 +0000, Jay K wrote:
>> I understand that userthreads don't scale across multiple processors.
>> But testing out cvsup lately, things are noticably much much faster
>> with user threads. At least cvsup. I haven't watched the compiler and
>> such.
>>
>>
>> - Jay
>>
>>
>>
>>
>>
>--
>DragiÅ¡a DuriÄ <dragisha at m3w.org>
More information about the M3devel
mailing list