Understanding Memory Management in Windows System Resource Manager
Applies To: Windows Server 2008 R2
You can create resource allocations in Windows System Resource Manager that limit the amount of working set memory or committed memory that is consumed by a process.
Memory limits are applied on a per-process basis. For example, if you create a resource allocation that specifies a working set limit of 10 megabytes (MB) and apply it to a process matching criterion that matches six running processes, the limit of 10 MB is applied individually to each of the six processes.
Working set memory limits
You can set an upper limit on the working set of a matched process. Windows System Resource Manager prevents the working set of a matched process from exceeding the limit that you define in the resource allocation. If the limit is reached, subsequent memory allocations do not fail, but existing pages in the working set are replaced. This prevents subsequent application errors.
Committed memory limits
You can set an upper limit on the committed memory that a process consumes. Typically, if there is a constant increase in the committed memory that a process consumes, it is due to a memory leak in the process. When you set a limit on the amount of committed memory that a process consumes, you can intervene if a memory leak occurs. When the limit is reached, Windows System Resource Manager can log an event to the event log, or terminate the process and log an event to the event log.
The Windows System Resource Manager service maintains the committed memory limit. The service monitors the committed memory usage of matched processes. The service also enforces the user-defined action whenever the committed memory usage of the process exceeds its limit. There are only two user-defined actions available:
- Log event
- Terminate process and log event
Do not use memory limits in Windows System Resource Manager to manage applications or processes that modify their own memory limits dynamically. This can interfere with the correct operation of Windows System Resource Manager and the managed application.
- As a best practice, use CPU targets to manage resources. Apply memory limits selectively to applications that exhibit memory consumption issues. Excessively limiting the memory that is available to an application can increase the time it takes the application to complete a task, and it can increase disk usage.