Skip to contentSkip to conversation

DISCUSSION Ying Chen 3 participants 3 messages Mar 6, 2001 – Mar 7, 2001

lore
Share & tools
lore

Ying Chen

author
#0 lore raw

Hi,

I have two questions on Linux pthread related issues. Would anyone be able to help?

1. Does any one have some suggestions (pointers) on good kernel Linux thread libraries?
2. We ran multi-threaded application using Linux pthread library on 2-way SMP and UP intel platforms (with both 2.2 and 2.4 kernels). We see significant increase in context switching when moving from UP to SMP, and high CPU usage with no performance gain in turns of actual work being done when moving to SMP, despite the fact the benchmark we are running is CPU-bound. The kernel profiler indicates that the a lot of kernel CPU ticks went to scheduling and signaling overheads. Has anyone seen something like this before with pthread applications running on SMP platforms? Any suggestions or pointers on this subject?

Thanks a lot!

Ying

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

#1 lore raw

Re: threads

Quoted 10 lines · On 03.07 Ying Chen wrote:

2. We ran multi-threaded application using Linux pthread library on 2-way SMP and UP intel platforms (with both 2.2 and 2.4 kernels). We see significant increase in context switching when moving from UP to SMP, and high CPU usage with no performance gain in turns of actual work being done when moving to SMP, despite the fact the benchmark we are running is CPU-bound. The kernel profiler indicates that the a lot of kernel CPU ticks went to scheduling and signaling overheads. Has anyone seen something like this before with pthread applications running on SMP platforms? Any suggestions or pointers on this subject?

Too much contention ? How frequently do you create and destroy threads ? How much frequently do they access shared-writable-data ? How do you protect them ?

It seems like your system spents more time creating and killing threads that doing real work.

Signature · 4 lines
J.A. Magallon                                                      $> cd pub
mailto:[email protected]                                          $> more beer

Linux werewolf 2.4.2-ac13 #3 SMP Wed Mar 7 00:09:17 CET 2001 i686
#2 lore raw

Re: your mail

In reply to Ying Chen

Ying-

I'm a little confused here. It's very hard to compare a UP application vs. the same app. converted to use threads. Unless the app. is structured such that multiple threads can run at the same time then no, you won't see any improvement by going to SMP, in fact a true single threaded app. will frequently slow down when run on an SMP kernel.

Have you watched a CPU meter while your benchmark runs? Even something basic like `top' should give you a feel for whether or not your using all of the CPU's.

Quoted 31 lines · Ying Chen

Hi,

I have two questions on Linux pthread related issues. Would anyone be able to help?

...

2. We ran multi-threaded application using Linux pthread library on 2-way SMP and UP intel platforms (with both 2.2 and 2.4 kernels). We see significant increase in context switching when moving from UP to SMP, and high CPU usage with no performance gain in turns of actual work being done when moving to SMP, despite the fact the benchmark we are running is CPU-bound. The kernel profiler indicates that the a lot of kernel CPU ticks went to scheduling and signaling overheads. Has anyone seen something like this before with pthread applications running on SMP platforms? Any suggestions or pointers on this subject?

Thanks a lot!

Ying

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 4 lines
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
[email protected]
Ph: 303/938-9838