• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Poor performance of pthreads across cpu dies.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Poor performance of pthreads across cpu dies.


  • Subject: Poor performance of pthreads across cpu dies.
  • From: email@hidden
  • Date: Wed, 29 Aug 2007 14:24:53 -0700

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


  • Follow-Ups:
    • Re: Poor performance of pthreads across cpu dies.
      • From: Andrew Gallatin <email@hidden>
    • Re: Poor performance of pthreads across cpu dies.
      • From: Terry Lambert <email@hidden>
  • Prev by Date: Re: Shutdown/Reboot/Logout problem.
  • Next by Date: Re: Poor performance of pthreads across cpu dies.
  • Previous by thread: Re: Shutdown/Reboot/Logout problem.
  • Next by thread: Re: Poor performance of pthreads across cpu dies.
  • Index(es):
    • Date
    • Thread