[Boost-bugs] [Boost C++ Libraries] #6549: Really poor named_semaphore performance in Windows

Subject: [Boost-bugs] [Boost C++ Libraries] #6549: Really poor named_semaphore performance in Windows
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-02-13 05:18:33


#6549: Really poor named_semaphore performance in Windows
----------------------------------------------------+-----------------------
 Reporter: Josh Davidson <josh.davidson@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: |
----------------------------------------------------+-----------------------
 I'm experiencing performance issues using named semaphores on Windows 7
 x64. Currently, I'm on 1.49 beta 1, but the behavior was similar on 1.48
 and 1.47. Below, I'm copying two sets of sample programs. They simply
 synchronize with one another using a pair of semaphores. To run them,
 start the first program and then the second. They will synchronize with
 each other 100k times and then the second program will spit out the
 elapsed time. You can restart the second program to run again without
 bringing down the first program. One set uses boost::interprocess
 named_semaphores. The second uses native win32 api to demonstrate the
 difference.

 On Windows, the elapsed time the first time around is anywhere from 20 -
 40 seconds. If you leave the second program running, the following run
 will be only about 2-3 seconds. A third run it will be back up to 20-40
 seconds, and it will keep bouncing back and forth like that. The pure
 Windows implementation completes in only 250ms (up to 160x faster). On
 Linux, the total elapsed time is consistently less than half a second.

 Something is up. Wrapping the native semaphores shouldn't slow them down
 this drastically. Also, the fact that the performance bounces around is
 another indication that something is seriously wrong.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6549>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC