Windows System Resource Manager – QoS For The Rest Of Us

Windows System Resource Manager – QoS For The Rest Of Us

What is quality of service? In the technology field, this term refers to the ability to provide differentiated priority to applications or data, or to ensure a certain level of perfomance. For example, in the networking world, quality of service may be applied to ensure that a Voice Over IP implementation is guaranteed a certain data rate to prevent poor call quality or packet loss.

Many technology professionals are familiar with the concepts of quality of service when it comes to the networking world; concepts such as rate limiting and differentiated services are common techniques used in the networking world to ensure a consistent and reliable experience. But did you know that those of us in the systems administration world also have options available to us to provide the same quality and consistency in our user services? Let’s take a look at one method we can use to accomplish QoS in Windows, the Windows System Resource Manager.

What is Windows System Resource Manager?
WSRM is a resource reservation control mechanism built into Windows Server 2008 and Windows Server 2003 R2 that enables the allocation of system resources amongst different applications based on defined priorities. In simpler terms, WSRM allows administrators to define the amount of processor and memory a particular application or process is allowed to consume.

How does it work?
So how does WSRM work? Well things can get pretty tricky when considering all the technical options, suffice it to say that WSRM in its most basic form uses two distinct configuration areas to accomplish its magic:

Process Matching Criteria
A process matching criteria allows you to define rules that identify an application or process for later assignment to a resource allocation policy. You can define an identification rule for any type of object such as an application, process, registered service, or an IIS application pool. When defining a rule, you can enter multiple binaries or even a combination of all the types of objects described above.

Resource Allocation Policies
A resource allocation policy does exactly what it sounds like, defines the allocation of system resources. A resource allocation policy can define limits for two primary resource areas: processor percentage and committed/working set memory. When defining a resource allocation policy, you will choose the process matching criteria that the policy applies to, and define the resource limits and the action to be taken when limits are exceeded.

So why use Windows System Resource Manager?
It’s a good idea to implement a QoS mechanism for many reasons, but let’s take a look a just a few examples where WSRM shines.

Shared Terminal Server
A major area of struggle for administrators responsible for one or more terminal servers is that sometimes you may have one or two particularly resource hungry users that consume 90% of the systems resources, making the experience for other users terrible. A great way to solve this problem is to define a resource allocation policy that implements the ‘equal per user’ condition to ensure that each user receives an equal share of processor time.

Securing Against Denial of Service
Certain types of vulnerabilities and exploits affect application or service performance, these are often referred to as Denial of Service Attacks. In many Denial of Service (DoS) attacks, the attacker or malware rapidly replicates pieces of code or application requests until they overload the systems processor and/or memory resources. With WSRM, you can define a resource allocation policy that protects against a DoS attack by limiting the system resources available. For example, you could define a resource allocation policy that prevents a single web application from taking down an entire web server by limiting the amount of processor and working set memory available to the web application pool.

System Profiling
WSRM contains accounting features which allow you to profile a server and learn more about how applications and processes are consuming system resources before applying resource constraints on the system. This is also a great way to supplement performance counters in order to provide a very comprehensive view of how a system is performing.

Closing Thoughts
This article only discussed a very small subset of the capabilities of WSRM and the scenarios where it is useful, but hopefully it inspires you as a systems administrator to look at WSRM deeper and start thinking of ways QoS could be applied to your environment to ensure a secure, reliable and consistent experience for your users.

For more information about Windows System Resource Manager, check out the Microsoft TechNet Page

Tags: , , , , , ,

Leave a Reply