Boost logo

Boost :

Subject: Re: [boost] boost 153 interprocess_mutex much slower in windows 7 than xp?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2013-10-07 12:47:04


El 07/10/2013 16:26, Noll, Jeffrey T UTAS escribió:
> We have 3 processes that are synchronized with an interprocess mutex.
> Basically one of them has a multiplier which allows the others to run
> at a synchronized accelerated rate. Under XP we typically can get it
> to run at 5000 times realtime. New desktop refreshes are coming out
> running Windows 7 and the same code with faster machines with more
> memory are maxing out at 250 times with 95%+ cpu idle time.
>
> Am new to boost so am wondering if we're doing something wrong.
> Here's the crux of the code. 3 processes and some shared memory.

It might be due to Windows scheduler changes between XP and 7.
Interprocess mutexes have generally very big context-switch overhead.
This has been fixed for soon to be release Boost 1.55. You can try to
see if this is your problem changing the
boost/interprocess/detail/win32_api.hpp. Replace Sleep(1) with Sleep(0)
and see if your tests are improving. In that case you can try Sleep(0)
but your CPU usage will increase a lot, or try Boost 1.55 beta to see if
this definitely fixes the issue.

best,

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk