Background: The other day, a colleague of mine reported that he faced severe CPU load on his computer with our product (a Windows service created with C#). In the support forum for a ThirdParty component used in our software, he stumbled upon the environment variable OMP_WAIT_POLICY
which should be set to PASSIVE
. According to his words, that variable was specific to ThirdParty. It helped him cut CPU load by half.
I could hardly believe that because ThirdParty is responsible for less than a fifth of the CPU load of our product. I tested it on my machine, and voilà, the CPU load fell by half.
Now I am trying to find out what happens here. Since there are some Google results for OMP_WAIT_POLICY
, it is obvious that this environment variable is not at all specific for ThirdParty. According to the GNU documentation, this variable means If the value is PASSIVE, waiting threads should not consume CPU power while waiting
.
Since our application is heavily multi-threaded, also with many wait times in the threads between receiving fresh data sets from hardware, such a change should have influence. But that would require that the underlying implementation of .NET is sensitive to that variable - and I failed to find any documentation for that.
At what level of a Windows system does OMP_WAIT_POLICY
work?