Windows – Throttle CPU Usage consumed by Process

cpu usagecpu-throttlingprocesswindows-server-2008-r2

We run a game-server company where we basically have large amounts of customers sharing a single machine, and are just on their own instance of a Java Process (Minecraft) managed by our Web Control Panels. In the last few game updates released, we have noticed that many of the third-party plugins our customer's use have become poorly written and we are frequently seeing huge CPU increases from certain servers until we manually kill the process.

Our Game Panel automatically restarts processes, so killing them is not really an issue. Our problem is that once once of these servers starts consuming 50%+ CPU Usage, it takes atleast 5 minutes to RDP into the machine, locate who it belongs to, shut it down and notify them.

Are there any current solutions for Server 2008 which allow for the throttling of CPU usage or worst case, just auto kill a process stuck using that much? As Minecraft is essentially a single-threaded application, we have investigated using Affinity, although with the variations in our Packages and fluctuations in usage, this doesn't work well for us. Some option to throttle the maximum usage a process can use would be perfect, or at least the option to kill a process using that much.

Thanks!

Best Answer

It looks like you want something like what is described here:

http://technet.microsoft.com/en-us/library/ff384148%28v=ws.10%29.aspx

This is a per-user quota system for processes (per-SID technically) and should do what you need. If you have 10 Minecraft processes and limit each to 9%, you should have 10% CPU available for RDP and the like.

If you're hitting other resource limits, you might want to look into limiting those separately.

Related Question