Resource Governor Not Limiting CPU/RAM – SQL Server 2014 Troubleshooting

resource-governorsql serversql server 2014

I have an application that is consuming a lot of resources, actually this application drives CPU to. 99% which makes the server unusable (I think there is nothing I can do about this as is a third-party application).

So I decided to create a Resource Pool specific to this Application.

After creating the Resource Pool I limited this application to 2 cores and 25% CPU / RAM, it worked perfectly, CPU of the server was at 25-26% all the time when before it was at 99%…

Then I decided to remove the MAXDOP for the Resource Group and then the application went to 99% again… I have seen that the application query opened 8 parallel processes so I assumed that puting the resouce pool at MAX 10% would do the job (10*8 = 80% CPU) but if I don't limit the Cores then I'm getting again a 99% CPU consumption…

What am I doing wrong?…

Best Answer

If you want to limit the CPU of a resource pool then you need to use the CAP_CPU_PERCENT setting:

This settings is a hard cap limit on the CPU bandwidth for all requests in the resource pool. Workloads associated with the pool can use CPU capacity above the value of MAX_CPU_PERCENT if it is available, but not above the value of CAP_CPU_PERCENT.

The MAX_CPU_PERCENT setting is designed to limit the average CPU usage. If there isn't contention on the server then it can be ignored:

If there is available CPU capacity, the workload uses it up to 100 percent. The maximum value only applies when there is contention for CPU resources.

You can read more about different resource pool settings in the documentation.