Re: Poor performance of pthreads across cpu dies.
Re: Poor performance of pthreads across cpu dies.
- Subject: Re: Poor performance of pthreads across cpu dies.
- From: Terry Lambert <email@hidden>
- Date: Wed, 29 Aug 2007 14:43:50 -0700
Please do not post the same thing to multiple lists.
You already posted this to the unix-porting mailing list, and it is
being discussed there. Since it involves porting Linux code, that's
the most appropriate list.
-- Terry
On Aug 29, 2007, at 2:24 PM, email@hidden wrote:
All,
I have a multithread application which has a number of threads. A
certain number of these threads process data and share the same data
structures. If I run this program on a 2 cpu dual core linux box I
see no performance penalties. If I run the same program on a xserve
with 2 xenon dual core cpus I see an 80% hit. So here is the
scenario:
A = One worker thread, multiple support threads.
B = two worker threads, multiple support threads.
C = four worker threads, multiples support threads.
If A runs on all cpus then the performance is 512 task units done.
If A runs on 1 physical cpu (2 cores) the performance is 470.
If B runs on all cpus the performance is 130.
If B runs on one cpu (2 cores) the performance is 380.
C has the same performance as B.
The behavior is that if the threads that share common data are
running on the same physical cpu die then the performance is 3 to 4
times greater than if they are split across two physical dies. I
ran the test shutting off one die per physical cpu and showed the
same results as if all cpus were active.
So here is the question: Is there something special one needs to do
using posix threads on Mac OS X Tiger vs Linux? The routines in
question are pthread mutexes and cond_wait_timeout..
If you can point me to a technical doc or bulletin explaining the
performance differences of pthreads on linux vs Mac OS X that would
be great.
Thanks,
Chris Driggett
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden