Search code examples
windows-7processcpu-usage

Setting maximum CPU usage per process in Windows


Is there a way to set the maximum CPU usage for a process in Windows 7?


Solution

  • You could check out "CPU rate limits in Windows Server 2008 R2 and Windows 7" - http://technet.microsoft.com/en-us/library/ff384148%28WS.10%29.aspx

    But be aware of the warning in http://blogs.iis.net/thomad/archive/2010/02/15/put-the-brakes-on-your-application-pools-cpu-rate-limits-in-windows-7.aspx. It says: Now here comes the drawback. The CPU Rate Limit feature has a bug. The kernel is holding on to a handle to the quota object and never lets go of it. This means once you set the CPU rate limit to a particular percentage you can't change this percentage without rebooting the machine. We are working on fixing it - not sure when we'll have a fix though. I have no idea if this bug is fixed.