We've all heard Microsoft's slogan for Windows Server 2003, "Do More With Less." In some cases, this slogan can...
be the literal truth.
Take, for example, what is going on at my organization, which probably isn't much different from what many of you are experiencing. Our main Exchange Server runs numerous applications besides Exchange, such as enterprise-class applications that provide anti-spam and anti-virus services to my entire network. On top of that, it is acting as a file and print server, and as a SQL server.
With one server running so many different services and applications, it is easy for one application to hog the server's resources and deprive the other applications of CPU time and memory. For example, there are times during periods of high database activity when SQL Server consumes so many system resources that Exchange starts to run very slowly. On the other hand, Exchange itself can also be a really resource-hungry application and often deprives my other applications of needed memory and CPU time.
Although my server is perfectly capable of running all of these different services and applications, the challenge is always to prevent SQL from choking out Exchange, and to keep Exchange from choking out everything else. A solution: Windows System Resource Manager (WSRM).
WSRM is a free feature pack for Windows Server 2003 Enterprise Edition and Datacenter Edition. You can download it at http://www.microsoft.com/windowsserver2003/downloads/wWSRM.mspx.
WSRM lets you assign memory and CPU resources to various applications, which lets you accomplish two different things. First, if you have an application that tends to hog all of the system's resources, you can limit how much memory and CPU time the application can actually consume. If you have an application that won't work correctly unless it is given a lot of memory and CPU time, you can guarantee that the application will get the resources that it needs. WSRM limits an application's resource consumption, but also guarantees that the application will get all of the resources that you have requested to be assigned to it.
You need to know about a couple of WSRM's capabilities at the outset. First, you can't use WSRM to limit the resource consumption of Windows itself. WSRM runs on top of Windows, and as such, Windows is exempt from WSRM policies. When you assign resources to an application, the resources are assigned as a percentage of the system's overall available resources after Windows has taken what it needs. Sometimes an application will receive more CPU time or memory than you assigned to it. This occurs when other applications don't use all of their assigned resources. For example, if you assigned 20% of the system's resources to Applications A and B, but application B is only using 10% of the system's resources, then application A could potentially be assigned 30% of the system's resources until application B needs more resources. If B does need more resources, it will take those resources from A, until both applications are using their allotted 20%.
That said, you will allocate resource usage through policies. There are numerous ways to create policies, but I recommend beginning by making a list of all of the applications and services (other than services belonging to Windows) that run on your server. Group the items on the list into two categories--mission critical and non-mission critical.
Once you have made this list, you should decide what percentage of the available CPU time that you want to assign to mission-critical applications and what percentage should be assigned to non mission-critical applications. Don't worry about how much CPU time is needed by an individual application, such as Exchange, for right now.
Initially, you might decide that you want 80% of the CPU resources servicing mission critical applications and 20% servicing non critical applications. However, before you create a rule like this, you must decide how much CPU time you want to set aside for what WSRM calls "default applications." Default applications are applications undefined by a policy. For example, if you ran Notepad from the server console, Notepad would be considered a default application because it would probably be undefined by a policy that you create. Even if you don't make a habit of running things from the server console, you must have some CPU time reserved fro default application. Remember that something as simple as installing a service pack will be treated as running a default application.
My advice is to be generous with the amount of CPU time that you give to default applications. After all, when this CPU time isn't being used, WSRM will allocate it to other applications until it is needed. I would suggest using 10% of the CPU time for default applications, 20% for non mission critical applications, and 70% for mission critical applications. Of course you are free to tweak these numbers to meet your server's individual needs.
Part 2: How to create process matching criteria and a resource allocation policy in the Windows System Resource Manager.
Brien M. Posey, MCSE, is a freelance technical writer who has written for companies and publications that include Microsoft, CNET, ZDNet, MSD2D, and Relevant Technologies. He has also served as the CIO for a nationwide chain of hospitals and was once in charge of IT security for Fort Knox. Brien has received Microsoft's MVP award for his work with Windows 2000 Server and IIS. You can visit Brien's personal Web sites at http://www.brienposey.com and http://www.relevanttechnologies.com.