Windows System Resource Manager manages processor resources by adjusting the priority of processes. This guarantees a minimum percentage of available CPU bandwidth to process groups that are defined by process matching criteria. Resource management is not enforced unless the total CPU usage is greater than 70 percent.
You can also use Windows System Resource Manager to define processor affinity. This means that matched processes can be associated with a single processor or a group of processors on a multiprocessor computer.
Core operating system processes, including the Windows System Resource Manager service, are never managed. In addition, processes can be manually excluded from management by adding them to the user-defined exclusion list. Processes that are not excluded or that are not members of a managed process group must share the resources that remain after allocation. When Weighted_Remote_Sessions is set as the managing policy, resource allocation is performed by the kernel, regardless of the status of Windows System Resource Manager.
Processor management methods
Windows System Resource Manager can manage processor resources through percent CPU targets or processor affinity rules.
If an application includes CPU usage or processor affinity management, you should use its native resource management and add it to the user-defined exclusion list.
Percent CPU targets
The simplest method of allocating processor resources is to assign a percent CPU target to each group of processes that are defined by a process matching criterion. This target is the percent of available CPU bandwidth that is guaranteed as a minimum to the process group.
The resources that are available for allocation are those resources not used by core operating system processes or manually excluded processes.
Because Windows System Resource Manager guarantees minimum CPU bandwidth availability rather than limiting CPU bandwidth utilization, the actual CPU used by a managed process group can exceed the minimum allocation. Extra capacity from a managed process group that is not using its minimum allocation will be reallocated to process groups that need more resources.
When you create a resource allocation policy with CPU constraints, you can also choose a management rule to apply. These management rules are similar to the built-in resource allocation policies, but when they are applied to a single resource allocation that is part of a resource allocation policy, they divide the allocated CPU among all matched processes for the resource allocation.
The management rules include:
Windows System Resource Manager does not attempt to control how the allocated CPU is divided among matched processes. When this management rule is selected, you can sub-allocate resources to matched processes by using additional process matching criteria. For more information, see the sub-allocation section later in this topic.
For example, one matched process might consume all of the allocated CPU bandwidth. Windows System Resource Manager does not manage this consumption, so a second process might be affected.
Equal per process
Available CPU bandwidth is divided evenly among matched processes. When this management rule is selected, sub-allocation is not allowed.
For example, if two matched processes consume 100 percent of the allocated CPU bandwidth, Windows System Resource Manager will lower the priority of the process that exceeds 50 percent CPU usage.
Equal per user
Available CPU bandwidth is shared equally by groups of matched processes that are run by an individual user. When this management rule is selected, sub-allocation is not allowed.
For example, if two users are running multiple applications that consume 100 percent of the allocated CPU bandwidth, Windows System Resource Manager will lower the priority of processes run by the user who exceeds 50 percent CPU usage.
Equal per session
On an RD Session Host server, available CPU bandwidth is shared equally by matched processes running in each Remote Desktop Services session. When this management rule is selected, sub-allocation is not allowed.
For example, if two users connected to an RD Session Host server consume 100 percent of the allocated CPU bandwidth, Windows System Resource Manager will lower the priority of the processes run in the Remote Desktop Services session that exceeds 50 percent CPU usage.
Percent CPU target allocations may be further divided into sub-allocations. A sub-allocation allocates resources that are calculated as a percentage of the resources allocated by the parent resource allocation. This sub-allocation matches a different process matching criterion than the parent resource allocation.
Sub-allocations have precedence over the default resource allocation policy. For more information, see Sub-Allocate Resources.
Default management: Equal per process
The default policy for managing resources among processes in a single process group is the built-in policy Equal_Per_Process. With this policy:
- Available CPU bandwidth is divided equally
among the processes that are identified by the process matching
- Runaway process protection is enabled by
- Starting Windows System Resource Manager
without additional configuration applies this policy to all
processes that can be managed running on a managed server.
This default policy can be changed by editing the Windows System Resource Manager properties. You should enable the Current resource allocation policy (if the Calendar is disabled) or disable the Calendar default policy (if the Calendar is enabled).
In addition to specifying a CPU target percentage, matched processes can be linked with specific processors on multiprocessor systems. This method can effectively divide the resources of the server among a few process matching criteria, but you should exercise caution when using processor affinity with a larger number of process matching criteria. Windows System Resource Manager will consider only the state of that single processor when calculating the resources available to a process with affinity—so the processor resources can be over-allocated when the system is experiencing a high load.
On some occasions, available CPU bandwidth might be lower than expected. This will reduce the CPU bandwidth allocated to matched processes and can cause them to respond more slowly than you expect. This can occur when:
- The number of processors with which the
process group has affinity is too small.
- Processes without affinity use a processor to
which another process group is constrained.
Process matching criteria cannot check if there is an allocation conflict between processes with affinity.
CPU affinity management through Windows System Resource Manager is not recommended for SQL Server multi-instance management. Instead, use the processor affinity settings in SQL Server.