Public bug reported:

I noticed the results of this blog post:
http://mr-edd.co.uk/blog/sad_state_of_osx_pthread_mutex_t
and I was curious if the same sort of issue existed with the linux kernel and 
if it would shed any light on Bug #1058854
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1058854

The results don't appear to be as bad as those seen on Mac OS X, but they 
definitely are a lot poorer than I expected/hoped they would be. The code that 
builds on Linux is now available on that blog port and I created a git repo 
with the history here:
https://github.com/daveisfera/test_mutex

Here are the results from running it on the the same HP Pavilion dm4 that as 
the results from Bug #1058854:
mutex
 1 thread  real 0m 0.514s user 0m 0.512s sys 0m 0.000s
 2 threads real 0m 4.382s user 0m 5.176s sys 0m 3.544s
 4 threads real 0m 9.953s user 0m 9.709s sys 0m22.417s
 8 threads real 0m20.984s user 0m14.973s sys 1m 8.256s
16 threads real 0m38.725s user 0m28.426s sys 2m 5.484s

benaphore
 1 thread  real 0m 0.324s user 0m 0.312s sys 0m 0.008s
 2 threads real 0m 6.372s user 0m 6.380s sys 0m 5.572s
 4 threads real 0m17.820s user 0m12.273s sys 0m42.495s
 8 threads real 0m40.266s user 0m25.626s sys 2m14.400s
16 threads real 1m40.090s user 0m52.939s sys 5m45.802s

mutex2
 1 thread  real 0m 0.325s user 0m 0.320s sys 0m 0.004s
 2 threads real 0m 0.730s user 0m 0.816s sys 0m 0.384s
 4 threads real 0m 2.328s user 0m 3.388s sys 0m 5.704s
 8 threads real 0m 4.096s user 0m 5.328s sys 0m10.705s
16 threads real 0m 7.584s user 0m 9.609s sys 0m20.401s

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1058864

Title:
  Poor mutex and semaphore performance

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1058864/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to