Poor performance of pthreads across cpu dies.
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com All, 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. Thanks, Chris Driggett driggett@mac.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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: 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
driggett@mac.com