Windows System Resource Manager

You can use Windows System Resource Manager to allocate processor and memory resources to applications, users, Terminal Services sessions, and Internet Information Services (IIS) application pools.

  • Overview of Windows System Resource Manager

  • Windows System Resource Manager Checklists

  • Using Windows System Resource Manager

  • User Interface: Windows System Resource Manager

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Overview of Windows System Resource Manager

With Windows System Resource Manager for the Windows Server® 2008 operating system, you can manage server processor and memory usage with standard or custom resource policies. Managing your resources can help ensure that all of the services provided by a single server are available on an equal basis or that your resources will always be available to high-priority applications, services, or users.

Windows System Resource Manager only manages processor resources when the combined processor load is greater than 70%. This means that it does not actively limit the resources that can be used by each consumer when processor load is low. When there is contention for processor resources, resource allocation policies help ensure minimum resource availability based on the management profile that you define.

Features of Windows System Resource Manager

You can use Windows System Resource Manager to:

  • Manage system resources (processor and memory) with preconfigured policies, or create custom policies that allocate resources per process, per user, or per Internet Information Services (IIS) application pool.

  • Use calendar rules to apply different policies at different times without manual intervention or reconfiguration.

  • Automatically select resource policies that are based on server properties and events (such as cluster events or conditions) or changes to installed physical memory or number of processors.

  • Collect resource usage data locally or in a custom SQL database. Resource usage data from multiple servers can be consolidated on a single computer running Windows System Resource Manager.

Benefits of resource management

Because Windows Server 2008 is designed to give as many resources as possible to non-operating system tasks, a server running a single role usually does not require resource management. However, when multiple applications and services are installed on a single server, they are not aware of competing processes. An unmanaged application or service will typically use all available resources to complete a task. Thus, it is important to use a tool such as Windows System Resource Manager to manage system resources on multipurpose servers. Using Windows System Resource Manager provides two key benefits:

  • More services can run on a single server because service availability can be improved through dynamically managed resources.

  • High-priority users or system administrators can access the system even during times of maximum resource load.

Methods of resource management

Windows System Resource Manager includes four built-in resource management policies that you can use to quickly implement management. In addition, you can create custom resource management policies to meet your specific needs.

Built-in resource management policies

You can enable built-in resource management policies by selecting the type of policy to use. No further configuration is required.

Policy | Description
Equal per process | When the Equal_Per_Process resource allocation policy is managing the system, each running process is given equal treatment. For example, if a server that is running ten processes reaches 70% processor utilization, Windows System Resource Manager will limit each process to using 10% of the processor resources while they are in contention. Note that resources not used by low utilization processes will be allocated to other processes.
Equal per user | When the Equal_Per_User resource allocation policy is managing the system, processes are grouped according to the user account that is running them and each of these process groups is given equal treatment. For example, if four users are running processes on the server, each user will be allocated 25% of the system resources to complete those processes. A user running a single application is allocated the same resources as a user running several applications. This policy is especially useful for application servers.
Equal per session | When the Equal_Per_Session resource allocation policy is managing the system, resources are allocated on an equal basis for each session connected to the system. This policy is for use with terminal servers.
Equal per IIS application pool | When the Equal_Per_IISAppPool resource allocation policy is managing the system, each running IIS application pool is given equal treatment, and applications that are not in an IIS application pool can only use resources that are not being consumed by IIS application pools.

Custom resource management

You can use custom resource management methods to identify resource users and allocate resources to them based on your own criteria.

Feature Description

Process Matching Criteria

Enable you to select services or applications to be managed by resource allocation policy rules. You can choose by file name or command, or you can specify users or groups. For example, you could create a process matching criterion that applies management to the application iexplore.exe when it is run by the user Administrator.

Resource Allocation Policies

Allocate processor and memory resources to processes that are specified by process the matching criteria that you create.

Exclusion lists

Exclude applications, services, users, or groups from management by Windows System Resource Manager.

Note

You can also use command-line path matching in a resource allocation policy to exclude an application from management by only that policy.

Scheduling

Use a calendar interface to control one-time events or recurring changes to resource allocation. Different resource allocation policies can be active at different times of day, on different days of the week, or according to other scheduling paradigms.

Conditional policy application

Automatically switch resource allocation policies in response to certain system events (such as installing new memory or additional processors, starting or stopping a node, or changing the availability of a resource group in a cluster).

Additional references

  • Windows System Resource Manager

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Windows System Resource Manager Checklists

Use checklists to quickly get started managing resources with Windows System Resource Manager.

  • Checklist: Managing Resources with Built-In Resource Allocation Policies

  • Checklist: Managing Resources with Custom Resource Allocation Policies

  • Checklist: Setting Up a Resource Allocation Policy Schedule


Checklist: Managing Resources with Built-In Resource Allocation Policies

You can start managing resources immediately by using the built-in resource allocation policies that are part of Windows System Resource Manager. The built-in policies are:

  • Equal_Per_Process: All processes that can be managed are allocated an equal share of available CPU bandwidth.

  • Equal_Per_User: The aggregate CPU consumption of all processes run by an individual user is managed so that each user who is running processes has an equal share of available CPU bandwidth.

  • Equal_Per_IISAppPool: Each IIS application pool running on the managed computer is allocated an equal share of 99% of available CPU bandwidth.

  • Equal_Per_Session: On a terminal server, the aggregate CPU consumption of each terminal services session is allocated an equal share of available CPU bandwidth.

Task Reference

Verify that Windows System Resource Manager is installed.

Install Windows System Resource Manager

Add any applications that cannot or should not be managed by Windows System Resource Manager to the user-defined exclusion list.
  • Understanding Limitations and Exclusions of Windows System Resource Manager

  • Work with the User-Defined Exclusion List

Select a built-in resource allocation policy that meets your needs.

Working with Resource Allocation Policies

Configure the resource allocation policy to manage the computer. Alternatively, you can create a calendar event or a schedule by using the policy.

Note If you want to collect accounting data to see what resources the policy would manage, but you do not want to enable management, set the policy to Profile instead of Manage.
  • Start and Stop Resource Management

  • Scheduling Resource Management with the Calendar

Compare the performance of the managed computer with your expectations and goals.
  • View Windows System Resource Manager Status

  • For more information about using Performance Monitor, see http://go.microsoft.com/fwlink/?LinkId=55156

If necessary, choose a different built-in resource allocation policy to meet your needs, or create a custom resource allocation policy.
  • Working with Resource Allocation Policies

  • Use Conditions to Adjust Resource Policies

Additional considerations

  • The four built-in resource allocation policies in Windows System Resource Manager cannot be copied between computers or edited.

  • Critical operating system processes are excluded from built-in resource allocation policies.


Checklist: Managing Resources with Custom Resource Allocation Policies

You can define the way resources are managed by creating custom resource allocation policies.

Task Reference

Identify applications that you want to manage and verify that the applications can be managed by Windows System Resource Manager.
  • Overview of Windows System Resource Manager

  • Understanding Limitations and Exclusions of Windows System Resource Manager

Create one or more process matching criteria that will match the application or applications that you want to manage.

Working with Process Matching Criteria

Create one or more resource allocation policies that use the process matching criteria you created to identify managed applications. It is usually best to start with CPU allocations and then refine the resource allocation policy as necessary.

Working with Resource Allocation Policies

Configure one of the new resource allocation policies to manage the computer. Alternatively, you can create a calendar event or a schedule by using the policy.

Note

If you want to collect accounting data to see what resources the policy would manage, but you do not want to enable management yet, set the policy to Profile instead of Manage.
  • Start and Stop Resource Management

  • Scheduling Resource Management with the Calendar

Compare the performance of the managed application with your expectations and goals.
  • View Windows System Resource Manager Status

  • For more information about using Performance Monitor, see http://go.microsoft.com/fwlink/?LinkId=55156

If necessary, refine the resource allocation policy by changing the CPU allocation, adding memory limits, setting CPU affinities, or applying conditions.
  • Working with Resource Allocation Policies

  • Use Conditions to Adjust Resource Policies


Checklist: Setting Up a Resource Allocation Policy Schedule

Step Reference

Identify the application you want to manage and verify that the application can be managed by Windows System Resource Manager.

Understanding Limitations and Exclusions of Windows System Resource Manager

Create process matching criteria that will match the applications you want to manage.

Working with Process Matching Criteria

Create resource allocation policies that use the process matching criteria to identify managed applications. It is usually best to start with CPU targets and then refine the resource allocation policy as necessary.

Working with Resource Allocation Policies

Create a schedule that specifies when the resource allocation policy will run.

Scheduling Resource Management with the Calendar

Enable calendar control if it is not already enabled.

Enable or Disable Calendar Control

Compare the performance of the application under management with your expectations and goals.
  • View Windows System Resource Manager Status

  • For more information about using Performance Monitor, see http://go.microsoft.com/fwlink/?LinkId=55156

If necessary, refine the resource allocation policy by changing the CPU allocation, adding memory limits, setting CPU affinities, or applying conditions.
  • Working with Resource Allocation Policies

  • Use Conditions to Adjust Resource Policies


Using Windows System Resource Manager

You can use Windows System Resource Manager to allocate processor and memory resources to applications, users, Terminal Services sessions, and Internet Information Services (IIS) application pools.

  • Install Windows System Resource Manager

  • Understanding Limitations and Exclusions of Windows System Resource Manager

  • Creating Resource Management Policies

  • Start and Stop Resource Management

  • Use Conditions to Adjust Resource Policies

  • Scheduling Resource Management with the Calendar

  • Import or Export Criteria, Policies, and Schedules

  • Work with the User-Defined Exclusion List

  • View Windows System Resource Manager Status

  • Logging Accounting Data in Windows System Resource Manager

  • Configure Notification Options

  • Working with Windows System Resource Manager on Remote Systems

  • User Interface: Windows System Resource Manager

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Install Windows System Resource Manager

For Windows System Resource Manager to manage resources, the Windows System Resource Manager feature must be installed and the Windows System Resource Manager service must be running.

Install the Windows System Resource Manager feature

Membership in the local Administrators group, or equivalent, is required to complete these procedures.

To install the Windows System Resource Manager feature

  1. Click Start, point to Administrative Tools, and then click Server Manager. Microsoft Management Console will start.

  2. In the console pane, scroll down to Features Summary.

  3. Click Add Feature. The Add Features Wizard will start.

  4. In the list of features, select the check box for Windows System Resource Manager, and then click Next.

  5. Follow the steps in the Wizard to finish installing Windows System Resource Manager.

Start the Windows System Resource Manager service

Resource management depends on the Windows System Resource Manager service. If you just installed the Windows System Resource Manager feature, this service will not be running.

To start the Windows System Resource Manager service

  1. Click Start, point to Administrative Tools, and then click Services. Microsoft Management Console will start.

  2. In the console pane, scroll down in the list of services to Windows System Resource Manager.

    Note

    You may need to expand the Name column to find the service.

  3. Right-click Windows System Resource Manager, and then click Start.

Additional references

  • Windows System Resource Manager

  • Using Windows System Resource Manager

  • Start and Stop Resource Management


Understanding Limitations and Exclusions of Windows System Resource Manager

Windows System Resource Manager aims to ensure that system resources are available to processes, users, terminal services sessions, or Internet Information Services (IIS) application pools (collectively called workloads). If unmanaged, these workloads can contend for and exhaust the system resources. However, there are situations in which Windows System Resource Manager is not an appropriate management solution or cannot guarantee sufficient resources to server workloads.

Caution

Windows System Resource Manager cannot manage system resources correctly if the computer is being managed by another resource manager, including process-oriented and job object-oriented resource managers. For best results, use Windows System Resource Manager as the only resource manager on the computer.

What should not be managed by Windows System Resource Manager

Applications with built-in resource management

Applications and processes that modify their process priority, memory limits, or processor affinity dynamically can interfere with the correct operation of Windows System Resource Manager.

If you use Windows System Resource Manager to manage a computer with applications that include built-in resource management, you must add the self-managed applications and processes to the user-defined exclusion list. For more information about the user-defined exclusion list, see Work with the User-Defined Exclusion List.

Applications that use job objects

Some applications create processes that use job objects. Processes that use job objects cannot be managed by Windows System Resource Manager. To determine whether an application uses job objects, see the documentation for the application.

If you use Windows System Resource Manager to manage a computer with applications that use job objects, you must add those applications to the user-defined exclusion list.

What is not managed by Windows System Resource Manager

Applications or processes hosted by an excluded application

Exercise caution when adding processes that host other processes or applications to the user-defined exclusion list. If an application such as svchost.exe is added to the user-defined exclusion list, any process that it hosts could potentially consume all available resources because it is not managed. If the hosting process is not on the user-defined exclusion list, it and any processes it hosts will be managed as part of a criterion match or as part of the default group.

Resources used by the operating system

Processor and memory resources that are used by the operating system are excluded from management by Windows System Resource Manager. For example, if the operating system is using 25% of the available CPU on a system that is managed by the Equal_per_user resource allocation policy, each of three users who are running processes on the computer will be allocated 25% of the total CPU, which is 33.33% of the CPU that is available to be managed.

If the remaining resources are not sufficient to support the workloads installed on the server, you can:

  • Reduce the number of workloads running on the server.

  • Install additional hardware to increase the available resources.

  • Install a Server Core installation of the Windows Server 2008 operating system to reduce the resources that are consumed by the operating system (if the applications and services running on the server support it).

Additional references

  • Using Windows System Resource Manager

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Creating Resource Management Policies

To manage processor and memory resources on your server, you can apply one of the four built-in resource allocation policies, or you can create a combination of custom process matching criteria and resource allocation policies for custom management.

  • Understanding Limitations and Exclusions of Windows System Resource Manager

  • Working with Resource Allocation Policies

    • Understanding Processor Management in Windows System Resource Manager

    • Understanding Memory Management in Windows System Resource Manager

    • Create a New Resource Allocation Policy

    • Sub-Allocate Resources

  • Working with Process Matching Criteria

    • Understanding Process Matching Criteria

    • Creating Process Matching Criteria

    • View Resource Allocation Policy Dependencies


Working with Resource Allocation Policies

Resource allocation policies define how processor and memory resources are allocated to processes, users, or groups. In addition to the four built-in resource allocation policies in Windows System Resource Manager, you can create custom policies to meet your needs.

  • Understanding Processor Management in Windows System Resource Manager

  • Understanding Memory Management in Windows System Resource Manager

  • Create a New Resource Allocation Policy

  • Sub-Allocate Resources

Additional references

  • Using Windows System Resource Manager

  • Creating Resource Management Policies

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Understanding Processor Management in Windows System Resource Manager

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%.

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.

Important

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.

Processor management methods

Windows System Resource Manager can manage processor resources through percent CPU targets or processor affinity rules.

Important

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.

Note

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. Likewise, extra capacity from a managed process group that is not using its minimum allocation will be reallocated to process groups that need more resources.

Management rules

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:
Standard (Default)

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 using additional process matching criteria. For more information, see the sub-allocation section.

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% of the allocated CPU bandwidth, Windows System Resource Manager will lower the priority of the process that exceeds 50% 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% of the allocated CPU bandwidth, Windows System Resource Manager will lower the priority of processes run by the user who exceeds 50% CPU usage.

Equal per session

On a Terminal Server, available CPU bandwidth is shared equally by matched processes running in each terminal services session. When this management rule is selected, sub-allocation is not allowed.

For example, if two users connected to a terminal server consume 100% of the allocated CPU bandwidth, Windows System Resource Manager will lower the priority of the processes run in the terminal services session that exceeds 50% CPU usage.

Sub-allocation

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 criterion.

  • Runaway process protection is enabled by default.

  • 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).

Processor affinity

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.

Note

CPU affinity management through Windows System Resource Manager is not recommended for SQL Server multi-instance management. Instead, use SQL Server's processor affinity settings.

Additional references

  • Windows System Resource Manager

  • Using Windows System Resource Manager

  • Working with Resource Allocation Policies

  • Sub-Allocate Resources

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Understanding Memory Management in Windows System Resource Manager

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 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, terminate the process, or restart the process.

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.

Additional considerations

  • 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.

Additional references

  • Working with Resource Allocation Policies

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Create a New Resource Allocation Policy

A resource allocation policy defines how resources are managed by Windows System Resource Manager. Only one resource allocation policy at a time can be managing a computer.

A resource allocation policy is made of one or more resource allocations. Resource allocations apply to applications and processes that match a process matching criterion.

Important

You need to create at least one process matching criterion before creating resource allocation policies unless you want to manage only residual processes or Internet Information Services (IIS) application pools. For more information about process matching criteria, see Working with Process Matching Criteria.

Creating a resource allocation policy

A resource allocation policy must contain at least one resource allocation. Types of resource allocations include CPU targets, memory limits, and processor affinity. You can also sub-allocate resources within one resource allocation in a resource allocation policy. For more information about sub-allocation, see Sub-Allocate Resources.

Membership in the local Administrators group, or equivalent, is required to complete these procedures.

To create a new resource allocation

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Resource Allocation Policies, and then click New Resource Allocation Policy.

  3. In Policy name, type a descriptive name for the new resource allocation policy, and then click Add.

    Note

    A resource allocation policy name cannot start with a hyphen (-) and cannot contain spaces or the following characters: , \ / * ; ? : " | - < or >.

  4. Use the procedures that follow to create a CPU target resource allocation, a memory resource allocation, or processor affinity in the Add or Edit Resource Allocation dialog box.

  5. When you are finished adding resource allocations, click OK.

The most common type of resource allocation is a CPU target. For more information, see Understanding Processor Management in Windows System Resource Manager.

Creating a CPU target resource allocation

  1. In the Add or Edit Resource Allocation dialog box, click the General tab, click Process matching criteria, and then select a process matching criterion for which matched processes will be managed by the resource allocation.

  2. In the Percentage of processor allocated for this resource text box, type (or select a value from the drop-down list) the percentage of available CPU bandwidth to be allocated, and then click OK.

    Note

    If the percentage value is set to 0, CPU bandwidth is not allocated. This means that matched processes will not be able to consume any CPU bandwidth if the bandwidth allocated to other resource allocations in the resource allocation policy adds up to 100%.

Memory resource allocations limit the amount of memory consumed by a single process, and they can trigger user-defined actions when limits are exceeded. For more information, see Understanding Memory Management in Windows System Resource Manager.

To create a memory resource allocation

  1. In the Add or Edit Resource Allocation dialog box, click the General tab, click Process matching criteria, and then select a process matching criterion for which matched processes will be managed by the resource allocation.

  2. On the Memory tab, select one or both:

    • Use maximum committed memory for each process

    • Use maximum working set limit for each process

  3. If you selected Use maximum committed memory for each process:

    • In Maximum committed memory limit per process, type a value in megabytes.

    • In If memory is surpassed, select an action to take when the limit is reached.

  4. If you selected Use maximum working set limit for each process, in Maximum working set limit per process, type a value in megabytes.

  5. Click OK.

Processor affinity limits matched processes to the processors with which they have affinity. For more information, see Understanding Processor Management in Windows System Resource Manager.

To define processor affinity

  1. In the Add or Edit Resource Allocation dialog box, click the General tab, click Process matching criteria, and then select a process matching criterion for which matched processes will be managed by the resource allocation.

  2. On the Advanced tab, select Use specified processors.

  3. Enter the processor number, processor number list, or range of processor numbers, and then click OK. (Processor numbers range from 0 to (n-1), where n is equal to the number of processors in the server.)

    • To specify a single processor, type the processor number.

    • To specify a processor number list, separate the processor numbers with a comma. For example, type: 0, 3, 7.

    • To specify a processor number range, separate the first and last processor number with a hyphen. For example, type: 2-4.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Working with Resource Allocation Policies

  • Working with Process Matching Criteria


Sub-Allocate Resources

A sub-allocation is a resource allocation hierarchy that consists of one or more grouped resource allocations.

You can use a sub-allocation to divide a CPU resource allocation into one or more resource allocations, each with its own CPU allocation. These sub-allocations are grouped hierarchically under the top-level resource allocation. The percentage of the CPU that is allocated to the parent resource allocation is then distributed among the sub-allocations, following the proportions that are specified in the CPU allocation of each sub-allocation.

Note

Windows System Resource Manager evaluates the entire hierarchy of sub-allocations while applying management policies. The sub-allocation that is last in the hierarchy is applied first, and the remaining allocations are applied in order moving back up the hierarchy to the parent resource allocation.

The only relationship between a resource allocation and its sub-allocation is that they share the CPU bandwidth allocated by the parent resource allocation. The processes matched to these allocations are different.

  • Creating sub-allocations

  • Example sub-allocations

Creating sub-allocations

Sub-allocations are created in existing resource allocations, which are part of resource allocation policies.

Note

You can only create a sub-allocation when the management rule of the parent resource allocation is set to Standard.

Note

Each sub-allocation must be configured to use a different process matching criterion. If the same process matching criterion is used multiple times in a sub-allocation hierarchy, processes will be managed by the first resource allocation they match.

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To create a sub-allocation in an existing resource allocation

  1. Open Windows System Resource Manager.

  2. In the navigation tree, expand Resource Allocation Policies, right-click the name of the resource allocation policy that contains the resource allocation where you want to create a sub-allocation, and then click Properties.

  3. On the Resources tab, in Allocate these resources, click the name of the resource allocation where you want to create a sub-allocation, and then click Edit.

  4. On the Advanced tab, click Sub-allocate resources.

  5. In Sub-allocate Resources, click Add.

  6. Follow the steps to create a resource allocation. For step-by-step instructions, see the procedures in Create a New Resource Allocation Policy. When you are finished, click OK.

  7. You can create as many sub-allocations as you need.

    • You can create more sub-allocations under the parent resource allocation by clicking Sub-allocate resources again.

    • To create sub-allocations under a sub-allocation, click Sub-allocate resources, click the sub-allocation you want to further sub-allocate, click Edit, and then continue from Step 3 of this procedure.

  8. When you are finished creating sub-allocations, on the parent resource allocation Properties page, click OK.

Example sub-allocations

Sub-allocating resources among multiple server functions

One situation in which you would use sub-allocation is when you have a single server that performs multiple functions. Each of the functions is equally important, and multiple applications run to complete each function.

You can configure a single resource allocation with multiple child sub-allocations, each with its own relative allocation. In this way, you can create a hierarchy.

The following table gives an example of how you can use simple sub-allocation to divide resources within a resource allocation policy. This example illustrates how to allocate resources among a group of processes that perform a function for which you want to reserve 50% of the total available CPU bandwidth, while leaving the other 50% for remaining processes.

Each allocation or sub-allocation is listed in the order in which you would create it.

Allocation or sub-allocation Properties

Resource allocation ra_A

  • 50% of available CPU

  • Applies to process matching criterion pmc_A

The parent resource allocation that is further divided by its sub-allocations. The parent allocation is applied last. Thus, any resources that are not consumed by its sub-allocations will be available to processes that match pmc_A.
  • Sub-allocation sub_B

    • 20% of CPU allocated by ra_A

    • Applies to process matching criterion pmc_B

The first sub-allocation of ra_A. Processes that match pmc_B can use up to 10% of the total CPU bandwidth (20% of the 50% available to ra_A).

  • Sub-allocation sub_C

    • 30% of CPU allocated by ra_A

    • Applies to process matching criterion pmc_C

The second sub-allocation of ra_A. Processes that match pmc_C can use up to 15% of the total CPU bandwidth (30% of the 50% available to ra_A).

Resource allocation ra_D

  • 50% of available CPU

  • Applies to the Residual process matching criterion.

A resource allocation on the same level in the hierarchy as ra_A. Processes that do not match another process matching criterion can consume up to 50% of the total available CPU bandwidth.

Because the sub-allocations in the example add up to 50% of the parent resource allocation, processes that match pmc_A can use a minimum of 25% of the total CPU bandwidth, or 50% of the 50% available to ra_A.

Prioritizing processes using sub-allocations

Another situation in which you would use sub-allocations is when you have a server that performs multiple functions that you want to prioritize according to their importance. Because the resources not used by a sub-allocation become available to its parent resource allocation, you can use this built-in logic to prioritize processes using sub-allocations.

To prioritize processes, create a series of nested sub-allocations in order from the last resource allocation you want to apply (the parent resource allocation) to the first resource allocation you want to apply (the last sub-allocation), giving each allocation 99% CPU.

Each resource allocation and sub-allocation is given 99% of the available CPU because the goal is not to restrict CPU usage, but to define the order in which processes get access to CPU bandwidth.

The following table gives an example of how you can prioritize processes using sub-allocations. Each allocation or sub-allocation is listed in the order in which you would create it.

Allocation or sub-allocation Properties

Resource allocation LowestPriority

  • 99% of available CPU

  • Matches process matching criterion LeastImportant

The parent resource allocation that is further divided by its sub-allocations. The parent resource allocation is applied last. Thus, any resources that are not consumed by its sub-allocations will be available to processes that match LeastImportant.

Sub-allocation MediumPriority

  • Sub-allocation of LowestPriority

  • 99% of CPU allocated by LowestPriority

  • Matches process matching criterion AvgImportant

The only sub-allocation of LowestPriority. It is applied before LowestPriority and after HighestPriority. Any resources that are not consumed by MediumPriority will be available to LowestPriority.

Sub-allocation HighestPriority

  • Sub-allocation of MediumPriority

  • 99% of CPU allocated by MediumPriority

  • Matches process matching criterion MostImportant

The only sub-allocation of MediumPriority. As the last sub-allocation, it is applied first. Any resources that are not consumed by HighestPriority will be available to MediumPriority.

In the example, processes are not constrained to a fixed amount of CPU bandwidth. Instead, processes to which the last sub-allocation applies get as much CPU bandwidth as they can consume, and the remaining CPU bandwidth is distributed among other competing processes in order moving back up the chain.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Working with Resource Allocation Policies

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Working with Process Matching Criteria

Process matching criteria are used to match processes running on the system and aggregate the matched processes into groups. A resource allocation policy can then manage those groups.

  • Understanding Process Matching Criteria

  • Creating Process Matching Criteria

  • View Resource Allocation Policy Dependencies


Understanding Process Matching Criteria

Process matching criteria are used to match processes that are running on the system and to aggregate the matched processes into groups. A resource allocation policy can then manage those groups.

How processes are matched

Each process matching criterion consists of one or more match criteria that specify the logic used to match processes. After a process matching criterion is defined, it can be included in one or more resource allocations.

A process matching criterion provides two mechanisms to match processes. One matches files or command lines. The other matches users or groups. These are explained in the following table.

Matching Criterion Description

Files or command lines

You can use files or command-line matching to select one or more registered services, running processes, or application executable files.

With files or command-line matching, you can match running processes on any part of the full command-line path of the application executable file that you use to create the process.

For example, you can use a wildcard as follows:

C:\Program Files\*

This example will match all applications that were started by an application executable file that is in the directory C:\Program Files\.

You can also match any part of the command-line string that is passed to the process when the process is created.

You can use file matching to match all processes that are created by the executable file name included in the match criterion. You can also use command-line matching to match all processes that contain the exact command-line path string. Unless you are using regular expressions or wildcards, a process is matched only if the process and match criterion are an exact match.

For example, if you start Help and Support Center, one of the processes it creates is helpctr.exe, which is the executable file name. The command-line string of the process is:

C:\Windows\PCHealth\HelpCtr\Binaries\helpctr.exe -FromStartHelp

To match this process, you could create a files matching criterion with the string helpctr.exe. This string exactly matches the executable file name of the process, helpctr.exe. However, if you created a command-line matching criterion such as C:\Windows\PCHealth\HelpCtr, it would not match. This is because command-line matching requires an exact match of the string C:\Windows\PCHealth\HelpCtr\Binaries\helpctr.exe or a regular expression or wildcard, such as C:\Windows\PCHealth\HelpCtr\*.

Users or groups

With user or group matching, you can select a user account or group. Any processes that are created by the user account or any member of the group are then matched.

When you use user or group matching, all processes that are started by the specified user or any user account that is a member of the specified group are matched. This is an equality match. It will match only those user accounts or groups that exactly match the user or group specified.

If you use group matching, the groups with the user account that starts the process are compared to the group specified in the process matching criterion. If there is an equality match, the process is matched.

You cannot use wildcards or regular expressions with user or group matching.

Note

When you create process matching criteria with the Windows System Resource Manager snap-in, specified user and group names are validated during the creation. However, imported process matching criteria are not validated. Verify that all user or group names in imported process matching criteria exist on the computer where the criteria were imported before you include the process matching criteria in a resource allocation policy.

Included process matching criteria

Two process matching criteria are included with Windows System Resource Manager:

  • The Residual process matching criterion matches all processes that:

    • Are not included in the user-defined exclusion list.

    • Are not excluded from management by Windows System Resource Manager.

    • Do not match another process matching criterion.

  • The IISAppPool process matching criterion matches all processes that are part of an Internet Information Services (IIS) application pool.

Considerations when creating process matching criteria

You include or exclude specific processes, paths, users, or groups when you create a process matching criterion.

A process can be matched to only one process matching criterion or resource allocation policy.

When you create a process matching criterion, you should consider whether all the processes of an application are known or not known.

  • When all processes are known: You can create an application-specific process matching criterion that will match only the processes that are part of the specified application.

  • When not all of the processes are known: You must be careful to not match unexpected processes when you create your matching criterion. It is a best practice to use full command-line path matching. Command-line path matching ensures that only processes that are started by the specific executable file of the application are matched.

There is a third, special case to consider when creating process matching criteria. This is when an application creates processes with the same name. For more information, see Creating Process Matching Criteria.

Process matching criteria logic

You can create multiple match criteria in a single process matching criterion to increase the number of processes that are matched. As match criteria become more complex, you can specify particular processes that are not to be matched by a general rule. To remove a process from a match set, you can use exclusion rules.

A process matching criterion must include at least one of the rules described in the following table under "Rule component." The use of multiple rules in a single process matching criterion is also supported.

Rule Component Comments

Included files or command lines

The match criterion is first compared to the full command-line path of all managed processes. All processes that match the criterion are grouped in the associated resource allocation.

Next, the match criterion is compared to the file name of all remaining managed processes and any processes that match are included in the resource allocation.

For example, if you specify a match criterion of *.exe, all running processes that are not on the user-defined exclusion list or the system-defined exclusion list would be matched. Included rules are always evaluated before excluded rules to determine whether there is match.

Excluded files or command lines

All processes that are created by the application that have this command-line path or file name as a property are not matched following the same order as the included criteria. For example, if you specify the match criterion C:\Program Files*, any process that has that string in its full command-line path is excluded from the match.

Included user or group

All processes that have an included user or group as a property are matched. For example, if you specify the Users group, all processes created by users in the Users group are matched. Included rules have a higher precedence than excluded rules, and they are always evaluated first to determine whether there is match.

Excluded user or group

All processes that have an excluded user or group as a property are not matched. For example, if you specify the Administrators group, all processes that are created by users in the Administrators group are excluded from matching.

A process matching criterion that is too broad can match processes you do not intend to match. For example, c*.exe will be a command-line path match for all managed processes if your system volume is C. This is because all of the running processes will have C in their command-line path, such as:

C:\Program Files\Internet Explorer\iexplore.exe

But on the same system, if there is no volume M, m*.exe will be a command-line match because the string m is not present in the command-line paths of any managed processes.

Additional references

  • Working with Process Matching Criteria

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Creating Process Matching Criteria

Process matching criteria are used to match processes running on the system and aggregate the matched processes into groups. A resource allocation policy can then manage those groups.

  • Create a Process Matching Criterion Using Path Matching

  • Create a Process Matching Criterion Using User or Group Matching


Create a Process Matching Criterion Using Path Matching

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

Creating basic process matching criteria using path matching

The following procedure describes how to create process matching criteria by using path matching for all instances of a specific application.

To create a process matching criterion by using path matching

  1. Open Windows System Resource Manager.

  2. In the console tree, right-click Process Matching Criteria, and then click New Process Matching Criteria.

  3. In the Criteria Name text box, type a descriptive name for the new process matching criterion, and then click Add.

    Note

    A process matching criterion name cannot start with a hyphen (-) and cannot contain spaces or the following characters: , \ / * ; ? : " | - < or >.

  4. On the Files or Command Lines tab, specify the processes, services, or applications to be managed as follows:

    1. To specify the process manually, in the Included files or command lines text box, type the file name or command line path.

      —or—

    2. To choose the process from a list, select Registered Service, Running Process, or Application, and then click Select.

    • If you selected Registered Service or Running Process, click the process that you want to match, and then click OK.

    • If you selected Application, type the path to the location of the application executable file (or click Browse to find the application executable file, and then double-click the application executable file).

  5. To exclude processes, services, or applications from management, select Excluded files or command lines, and then do one of the following:

    1. To specify the process manually, in Excluded files or command lines, type the file name or command line path.

      —or—

    2. To choose the process from a list, select Registered Service, Running Process, or Application, and then click Select.

    • If you selected Registered Service or Running Process, click the process that you want to match, and then click OK.

    • If you selected Application, type the path to the location of the application executable file (or click Browse to find the application executable file, and then double-click the application executable file).

  6. Repeat this procedure as necessary to create additional processes, and then click OK.

Creating advanced process matching criteria using path matching

You can create advanced process matching criteria by using path matching to:

  • Manage multiple processes that were created by the same executable file.

  • Specify process matching based on strings that are passed by the command line.

The process matching criteria in this section use regular expressions.

Managing multiple processes created by the same .exe

Some applications, such as Internet Information Services (IIS), start multiple processes from the same .exe file. To distinguish among individual or groups of processes that are started from the same .exe, you must develop specific process matching criteria.

For example, to select an IIS 6.0 Web site with a process matching criterion requires the following information:

  • The name of the .exe of the process that handles IIS 6.0 requests, which is always w3wp.exe.

  • The name of the application pool that corresponds to the Web site that is served by each w3wp.exe process. This name is specified by the user, but for the purposes of this example, it will be called example.

You can now create a process matching criterion that includes the following match string:

@.*w3wp\.exe.*example.*

This string will match any process with a full command-line string that matches anything w3wp.exe anything example anything, which will match all processes related to the Web site example.

Specifying resource allocations based on strings passed on the command-line

You can specify resource allocations that are based on strings passed on the command-line. Use these to create resource-allocation policies that assign varying resource allocations, depending on the arguments passed to the program's .exe. This is illustrated in the following example:

file.exe -switch1:arg1 -switch2:arg2

Using process matching criteria, you can specify that different resource allocations are used, depending on which switch is used. For example, use Resource1 when switch1 is specified, Resource2 when switch2 is specified, and Resource3 when both or neither switch is specified. To do this, you create four process matching criteria, as illustrated in the following table:

Process Matching Criterion | String
PMC-switch1 | @.*file\.exe.*switch1:.*
PMC-switch2 | @.*file\.exe.*switch2:.*
PMC-switch1and2 | @.*file\.exe.*switch1:.*switch2:.*; @.*file\.exe.*switch2:.*switch1:.*
PMC-neitherswitch1nor2 | @.file\.exe.*; !@.*file\.exe.*switch1:.*; !@.*file\.exe.*switch2:.*

The process matching criteria must be ordered as follows in the resource allocation policy to accomplish the management goal:

Process matching criterion | Resource allocation
PMC-neitherswitch1nor2 | Resource3
PMC-switch1and2 | Resource3
PMC-switch1 | Resource1
PMC-switch2 | Resource2

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • Windows System Resource Manager supports the following environment variables in process matching criteria: WINDIR, PROGRAMFILES, TMP, and TEMP.

  • If you type an environment variable as part of a command at a command prompt, you must bracket the variable with carets(^) as shown in the following example:

    ^%windir%^
    This prevents the environment variable from being expanded by the shell on the client.

  • You do not have to use carets if you specify environment variables while creating process matching criteria using the Windows System Resource Manager snap-in.

Additional references

  • Windows System Resource Manager

  • Working with Process Matching Criteria

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Create a Process Matching Criterion Using User or Group Matching

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To create a process matching criterion using User or Group matching

  1. Open Windows System Resource Manager.

  2. In the console tree, right-click Process Matching Criteria, and then click New Process Matching Criteria.

  3. In the Criteria Name text box, type a descriptive name for the new process matching criterion, and then click Add.

    Note

    A process matching criterion name cannot start with a hyphen (-) and cannot contain spaces or the following characters: , \ / * ; ? : " | - < or >.

  4. Click the Users or Groups tab, and then do one of the following:

    • To match processes based on user or group membership, in Included users and groups, click Add.

    • To exclude users or groups from matching, select Excluded users and groups, and then click Add.

  5. In Select Users or Groups, type the user or group name, and then click OK.

  6. Repeat this procedure as necessary to include all of the appropriate user or group names.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • User or group matching does not support using wildcards or regular expressions.

  • When you create process matching criteria with the Windows System Resource Manager snap-in, specified user and group names are validated during creation. However, imported process matching criteria are not validated. Verify that all user or group names in the imported process matching criteria exist on the computer before you include the process matching criteria in a resource allocation policy.

Additional references

  • Windows System Resource Manager

  • Working with Process Matching Criteria


View Resource Allocation Policy Dependencies

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

Resource allocation policies that use a process matching criterion to identify managed process groups can be viewed and edited from the dependencies list.

To view resource allocation policy dependencies

  1. Open Windows System Resource Manager.

  2. In the navigation tree, expand Process Matching Criteria.

  3. Right-click the name of a process matching criterion, and then click View PMC Dependencies.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Working with Resource Allocation Policies

  • Working with Process Matching Criteria

  • Resource Allocation Policy Properties

  • Add or Edit Resource Allocation Dialog Box


Start and Stop Resource Management

Start resource management

Windows System Resource Manager does not manage resources by default—even when the Windows System Resource Manager service is running. You must start management and choose a resource allocation policy.

To start resource management

  1. Click Start, point to Administrative Tools, and then click Windows System Resource Manager.

  2. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  3. In the console pane, click WSRM Management is currently - STOPPED. Windows System Resource Manager properties will open.

  4. In WSRM management state, select Running from the drop-down list.

  5. In Management type, select Manage from the drop-down list.

    Note

    If you want to collect data about when resources would be in contention, but you do not want to manage resources actively, select Profile from the drop-down list.

  6. In the Current resource allocation policy drop-down list, select the resource allocation policy that you want to use to manage your resources.

  7. Click OK.
Note

To use the Calendar to define resource allocation policies, see Scheduling Resource Management with the Calendar.

Stop resource management

Windows System Resource Manager will manage resources according to the management type and resource allocation policy that you select until you stop management (unless the Calendar has been used to schedule management).

When management is stopped, running processes are not managed and accounting records are not generated. However, you can perform administrative tasks and generate notifications. Any changes that you make while management is stopped will not take effect until management is restarted.

To stop resource management

  1. Click Start, point to Administrative Tools, and then click Windows System Resource Manager.

  2. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will launch with the Windows System Resource Manager (Local) snap-in open.

  3. In the console pane, click WSRM Management is currently - RUNNING. Windows System Resource Manager properties will open.

  4. In the WSRM management state drop-down list, select Stopped.

  5. Click OK.

Additional considerations

  • Membership in the local Administrators group, or equivalent, is required to use Windows System Resource Manager.

  • To manage resources, the Windows System Resource Manager feature must be installed and the Windows System Resource Manager service must be running. For more information, see Install Windows System Resource Manager.

Additional references

  • Windows System Resource Manager

  • Using Windows System Resource Manager

  • User Interface: Windows System Resource Manager


Use Conditions to Adjust Resource Policies

Windows System Resource Manager can automatically switch to a different managing policy when one of six preconfigured events occurs. In addition, when one of these events occurs, you can configure the conditional policy to evaluate additional system states and switch to another policy if one of the states is found to be true.

Note

States that are configured as part of a conditional policy are only evaluated, and their associated managing policies are only implemented, if the event that they are part of occurs first.

Six events are supported by Windows System Resource Manager. In the default installation, no policy changes occur when one of the events occurs.

Events that trigger conditional policy changes

Only one conditional policy can be configured for each event category. Each time an event occurs, any associated policy changes are implemented.

A special condition category Any is also installed by default. The Any condition category is only evaluated if no conditional policy exists for an event type.

Specific events that trigger conditional policy changes include:

  • Hot addition of a processor or processors

  • Hot addition of memory (RAM)

  • A Cluster service node comes online

  • A Cluster service node goes offline

  • A Cluster service resource group comes online

  • A Cluster service resource group goes offline

States that can be evaluated when an event occurs

After an event occurs, any states configured as part of the conditional policy for the event are evaluated. In order for Windows System Resource Manager to take action in response to an event, the event's conditional policy must contain at least one state to be evaluated.

States can be configured as single clauses, or as groups in which one or more clauses must be true in order for the state to be evaluated as true.

Clauses in a state can include:

  • Whether the number of processors is greater than, less than, or equal to a specified quantity

  • Whether the amount of memory is greater than, less than, or equal to a specified quantity

  • Whether a Cluster service node is online or offline

  • Whether a Cluster service resource group is online or offline

How conditional policies are applied

Conditional policies change the managing state according to the following process:

  1. An event occurs.

  2. Windows System Resource Manager looks for an existing conditional policy associated with the event.

    • If a conditional policy exists, Windows System Resource Manager proceeds from step 3 using the states and default policy for that conditional policy.

    • If a conditional policy does not exist, Windows System Resource Manager proceeds from step 3 using the states and default policy configured for the Any condition category.

  3. Windows System Resource Manager looks for states to be evaluated when the event occurs.

    • If there are no states configured to be evaluated as part of the conditional policy, no action is taken.

    • If there are states configured, the states are evaluated in order until one of the states is found to be true, and the action associated with the first true state is taken.

    • If no configured state is true, the default policy for the event (or for the Any condition category) is applied.

Editing conditional policies

Configuring the default policy

When an event occurs, Windows System Resource Manager will evaluate the states associated with the event, and if no state is true, the default policy associated with the event will be applied.

To configure the default policy associated with an event

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Conditions, and then click Add/Edit Conditional Policies.

  3. In the Add or Edit Conditional Policy dialog box, click the name of the event you want to configure, and then click Edit. The Conditional Policy Properties dialog box will open.

  4. Click a resource allocation policy name in the Choose default policy here drop-down list.

    Note

    The default policy is only applied if no state configured as part of the conditional policy is true.

Configuring additional states

In order for Windows System Resource Manager to take action when an event occurs, you must configure at least one state to be evaluated in the conditional policy for the event.

States are evaluated in the order in which they are listed from top to bottom. Once a state is found to be true, Windows System Resource Manager will switch the managing policy to the policy associated with that state, and no other states will be evaluated.

  • To change the order in which states are evaluated, in States, click the state you want to move, and then click the up or down arrows to move it.

  • To exclude a state from evaluation, de-select the check box next to the state. Note that if no states are selected for evaluation, no action will be taken when the event occurs.

To configure additional states to be evaluated when an event occurs

  1. In the Add or Edit Conditional Policy dialog box, click the name of the event you want to configure, and then click Edit. The Conditional Policy Properties dialog box will open.

  2. Click in an empty row in States to access the details configuration and create one or more clauses.

    Note

    You cannot configure the name of a state that has no clauses. The name column will be populated with information from the clauses you define.

  3. In Details for the selected state above, click in an empty cell in the Category column to select a category from the drop-down list.

    • If you selected Processor or Memory, click in the Operator column to choose an operator, and then click in the Quantity column to type a number of processors or a memory quantity (in MB).

    • If you selected MSCS, click to select a value from the Object Name drop-down list, type the name of the node or resource group in the Object Name cell, and then click in the State column to select a state from the drop-down list.

  4. When you are finished creating state clauses, in States, click the Policy Name column in the row for the state you just created. In the drop-down list, choose a policy to apply when the state is true.

Grouping state clauses

You can group state clauses so that one or more clauses must be true in order for the group to be evaluated true.

  • AND and OR operators have equal precedence.

  • Expressions are evaluated from left to right.

  • Grouped clauses are evaluated first. In the case of a nested group, the deepest nested group is evaluated first.

To combine state clauses to be evaluated as a group

  1. In the Add or Edit Conditional Policy dialog box, click the name of the event you want to configure, and then click Edit. The Conditional Policy Properties dialog box will open.

  2. In States, click an empty cell to create a new state, or click an existing state row.

  3. In Details for the selected state above, add multiple states that you want to combine as a single clause to be evaluated true or false.

  4. In Details for the selected state above, click the first row you want to combine with another row, and then press SHIFT+click at the same time to select rows to combine.

    Note

    You can only group rows that are consecutive. Nested groups are supported.

  5. Right-click the highlighted rows, and then click Add Group.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • Conditional policies assume that processors and memory cannot be removed while a computer is in service.

Additional references

  • Windows System Resource Manager

  • Add or Edit Conditional Policy Dialog Box

  • Conditional Policy Properties

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Scheduling Resource Management with the Calendar

  • Enable or Disable Calendar Control

  • Create a One-Time Event

  • Create a Recurring Event

  • Create a Schedule

  • Configure the Default Calendar Resource Allocation Policy

  • View Calendar Event and Schedule Dependencies

  • Set the Calendar Time Scale

  • Set a Schedule Time Scale


Enable or Disable Calendar Control

Membership in the local Administrators group, or equivalent, is required to complete these procedures.

To enable calendar control

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Calendar, and then click Enable.
To disable calendar control

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Calendar, and then click Disable. Windows System Resource Manager Properties will open with Calendar set to Disabled.

  3. Review the management type and current resource allocation policy to confirm that you want to use the new settings.

  4. Click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • If you enable calendar control, the calendar default resource allocation policy is automatically set to Managing unless another resource allocation policy is scheduled for the current time.

  • If calendar control is currently disabled, you can also enable it by clicking the Calendar - Disabled link on the Windows System Resource Manager start page.

Additional references

  • Windows System Resource Manager

  • Scheduling Resource Management with the Calendar


Create a One-Time Event

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To create a one-time event

  1. Open Windows System Resource Manager.

  2. In the navigation tree, expand Calendar, right-click Calendar Events, and then click New One Time Event.

  3. In Event Name, type a name for the event.

    Note

    A one-time event name cannot start with a hyphen (-) and cannot contain spaces or the following characters: , \ / * ; ? : " | - < or >.

  4. Select Policy Name or Schedule Name, and then choose a resource allocation policy or schedule with which to associate the one-time event.

    Note

    You must create at least one schedule to be able to select Schedule Name.

  5. In Start time and date, select a date and time.

    Note

    If you associated the one-time event with a schedule, the Time option is not available.

  6. In End time and date, select a time and date, and then click OK.

    Note

    If you associated the one-time event with a schedule, the Time option is not available.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • When you create or modify calendar events or schedules, time values that you specify will be expressed in the local time of the server. All time values that are displayed in the Windows System Resource Manager interface or saved to an XML file will also be expressed in the local time of the server.

Additional references

  • Windows System Resource Manager

  • Scheduling Resource Management with the Calendar


Create a Recurring Event

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To create a recurring event

  1. Open Windows System Resource Manager.

  2. In the navigation tree, expand Calendar, right-click Calendar Events, and then click New Recurring Event.

  3. In the Event Name text box, type a name for the event.

    Note

    A recurring event name cannot start with a hyphen (-) and cannot contain spaces or the following characters: , \ / * ; ? : " | - < or >.

  4. Click Policy Name or Schedule Name, and then do one of the following:

    • If you clicked Policy Name, select a resource allocation policy with which to associate the recurring event.

    • If you clicked Schedule Name, select a schedule with which to associate the recurring event.

  5. If you clicked Policy Name, in Start and end time do the following:

    • In the Start drop-down list, select a time for the policy to begin.

    • In the End drop-down list, select a time for the policy to end.

    • In the Duration drop-down list, select a value for the length of time that the policy will be in effect.

  6. Decide if you want the event to recur on a daily, weekly, monthly, or yearly basis, and then in Recurrence Pattern, do one of the following:

    1. Click Daily. In Recur every, specify (in days) how frequently the event should recur.

    2. Click Weekly. In Recur every, specify (in weeks) how frequently the event should recur, and then, in the check boxes provided, select one or more days.

    3. Click Monthly, and then do one of the following:

    • Click Recur on day. In the spaces provided, type a numeric value for the day of the month on which the calendar event should run and a numeric value (in months) for how frequently the event should recur.

    • Click Recur on the. In the drop-down boxes, select First, Second, Third, Fourth, or Last, select the day on which the calendar event should run, and then type a numeric value (in months) for how frequently the event should recur.

    1. Click Yearly, and then do one of the following:

    • Click Recur every. In the drop-down box, select a month, and then type a numeric value for the day on which the calendar event should run.

    • Click Recur on the. In the drop-down boxes, select First, Second, Third, Fourth, or Last, select the day, and then select the month on which the calendar event should run.

  7. In Recurrence Range, in the Start box, select a date for the policy to take effect.

  8. Select No end date, or select End on and specify an ending date, and then click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • When you create or modify calendar events or schedules, the time values that you specify will be expressed in the local time of the server. All time values displayed in the Windows System Resource Manager interface or saved to an XML file will also be expressed in the local time of the server.

Additional references

  • Windows System Resource Manager

  • Scheduling Resource Management with the Calendar


Create a Schedule

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To create a schedule

  1. Open Windows System Resource Manager.

  2. In the navigation tree, expand Calendar, right-click Schedules, and then click New Schedule.

  3. In Schedule Name, type a name for the schedule.

    Note

    A schedule name cannot start with a hyphen (-) and cannot contain spaces or the following characters: , \ / * ; ? : " | - < or >

  4. On the calendar display, double-click a time in the column to add a schedule item.

  5. In Policy name, select a resource allocation policy.

  6. In Start Time, select a time for the resource allocation policy to take effect.

  7. In End Time, select a time for the resource allocation policy to end.

  8. Repeat the procedure to add additional resource allocation policies to the schedule as necessary, and then click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • You cannot assign more than one resource allocation policy to the same time period in a schedule.

  • When you create or modify calendar events or schedules, the time values that you specify will be expressed in the local time of the server. All time values that are displayed in the Windows System Resource Manager interface or saved to an XML file will also be expressed in the local time of the server.

Additional references

  • Windows System Resource Manager

  • Scheduling Resource Management with the Calendar


Configure the Default Calendar Resource Allocation Policy

Membership in the local Administrators group, or equivalent, is the minimum required to complete this procedure.

To configure the default calendar resource allocation policy

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Windows System Resource Manager, and then click Properties.

  3. On the Management tab, in Calendar Default Policy, select a resource allocation policy, and then click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • When calendar control is enabled, the default calendar resource-allocation policy manages the system when a user-defined calendar event is not running. If a schedule is running, the default calendar resource allocation policy runs when other calendar events are not scheduled.

Additional references

  • Windows System Resource Manager

  • Scheduling Resource Management with the Calendar


View Calendar Event and Schedule Dependencies

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To view calendar event and schedule dependencies

  1. Open Windows System Resource Manager.

  2. In the navigation tree, expand Calendar, and then click Calendar Events.

  3. In the console pane, you can organize the list of calendar events by doing one of the following:

    • Click the Associated With column header to group calendar events according to Policy or Schedule.

    • Click the Associated Entity column header to group calendar events according to the resource allocation policy used.

    • Click the Status column header to group calendar events by their associated schedule, if one exists.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Scheduling Resource Management with the Calendar


Set the Calendar Time Scale

To set the calendar time scale

  1. Open Windows System Resource Manager.

  2. In the navigation tree, click Calendar.

  3. In Calendar Time Scale, do one of the following:

    • Click Day, and then select a scale in minutes from the list.

    • Or, click Week.

    • Or, click Month.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Scheduling Resource Management with the Calendar


Set a Schedule Time Scale

You can change the time scale (the unit of time that is included in each block in the calendar) for each schedule that you create.

To set a schedule time scale

  1. Open Windows System Resource Manager.

  2. In the navigation tree, expand Calendar, and then click Schedule.

  3. In the console pane, right-click the name of the schedule that you want to modify, and then click Edit Schedule Entry.

  4. Right-click in the calendar, point to Calendar Time Scale, and then click a value.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Scheduling Resource Management with the Calendar


Import or Export Criteria, Policies, and Schedules

You can import or export Windows System Resource Manager configuration information between computers. Configuration information stored includes process matching criteria, resource allocation policies, calendar events and schedules, and conditional policies. In this way, you can create management scenarios and then deploy them on other computers without performing the configuration multiple times.

Files Created and Imported

The files created by or imported by Windows System Resource Manager are:

File name | Description
allocationpol.xml | Contains information about resource allocation policies.
Calendar.xml | Contains information about calendar events and schedules.
ConditionalPolicy.xml | Contains information about conditional policies.
selectionpol.xml | Contains information about process matching criteria.

Exporting and Importing Configuration Information

Membership in the local Administrators group, or equivalent, is the minimum required to complete these procedures.

The following procedure describes how to export configuration information from a computer where you have successfully configured Windows System Resource Manager so that you can import it on another computer.

To export configuration information

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Windows System Resource Manager, and then click Export WSRM Information.

  3. In Location, type a directory path where you want to save the configuration information, or click Browse to find the directory you want to use. When you have entered the directory information, click OK.

  4. Windows System Resource Manager creates four XML documents in the specified directory that contain information about criteria, policies, and schedules.

The following procedure describes how to import configuration information that will replace the existing configuration on the computer where you are importing.

Caution

When you import configuration information, your previous settings are overwritten and cannot be recovered. If you are unsure whether you want to use the imported configuration, you should export your current settings as a backup before importing.

To import configuration information

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Windows System Resource Manager, and then click Import WSRM Information.

  3. In Location, type a directory path where the configuration information you want to import is located, or click Browse to find the directory you want to use. When you have entered the directory information, click OK.

  4. Windows System Resource Manager loads the XML files into its current configuration, overwriting any previous configuration data.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • When you create process matching criteria using the Windows System Resource Manager snap-in, specified user and group names are validated during creation. However, imported process matching criteria are not validated. Verify that all user or group names in imported process matching criteria exist on the computer where the criteria were imported before you include the process matching criteria in a resource allocation policy.

Additional references

  • Windows System Resource Manager

  • Using Windows System Resource Manager


Work with the User-Defined Exclusion List

By default, several svchost.exe processes are included in the user-defined exclusion list. Important operating system services run inside the svchost.exe processes. To ensure that these processes have access to their required CPU bandwidth, they are excluded from management. It is not usually necessary to manage these processes. However, if one or more of these processes start to consume excessive CPU bandwidth, you can manage them by removing them from the user-defined exclusion list. This allows Windows System Resource Manager to control the CPU bandwidth usage of these processes.

Processes that you should add to the user-defined exclusion list include those that do not respond well to management and those that you do not want Windows System Resource Manager to manage. Processes that Windows System Resource Manager does not control are unmanaged and can consume resources freely.

Because the behavior of unmanaged applications cannot be controlled, the effectiveness of Windows System Resource Manager can decrease if you include multiple processes or processes that use resources intensively in the user-defined exclusion list.

Editing the user-defined exclusion list

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To add or remove a process in the user-defined exclusion list

  1. Open Windows System Resource Manager.

  2. In the console tree, right-click Windows System Resource Manager, and then click Properties.

  3. Click the Exclusion List tab, and then select User Defined.

  4. Add or remove a process as follows, and then click OK:

    • To add a process to the exclusion list, click Add, and then browse to the directory where the program executable is located.

    • To remove a process from the exclusion list, select the process that you want to remove, and then click Remove.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • To add a process that is being managed by the active managing resource allocation policy to the user-defined exclusion list, you must first change the managing resource allocation policy to one that does not match the process or stop Windows System Resource Manager management.

  • If you want to add a process and include its arguments, you must use the command-line tool wsrmc. For help with wsrmc, at a command prompt, type wsrmc /? and then press ENTER.

Additional references

  • Windows System Resource Manager

  • Using Windows System Resource Manager

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


View Windows System Resource Manager Status

You can view the management status and the real-time performance data that is specific to Windows System Resource Manager in the Windows System Resource Manager Microsoft Management Console (MMC) snap-in.

Membership in the local Administrators group, or equivalent, is required to complete these procedures.

View Windows System Resource Manager management status

To view Windows System Resource Manager management status

  1. Open Windows System Resource Manager.

  2. In the navigation tree, click Windows System Resource Manager. The Windows System Resource Manager start page opens in the console pane.

  3. Review the current status.

The table below provides information about what the status icons in Windows System Resource Manager mean.

Status icon text Description

WSRM Management is currently

Displays the status of the Windows System Resource Manager service.

Calendar

Displays the calendar management status.

  • When calendar management is enabled, resources are managed according to the resource allocation policy that is scheduled for the current time. If no resource allocation policy is scheduled for the current time, the calendar default policy is in effect.

  • When calendar management is disabled, either a manually applied resource allocation policy or the default resource allocation policy is in effect.

For more information about the calendar, see Scheduling Resource Management with the Calendar.

Management Type

Displays the management type that is currently in effect.

  • When the management type is Manage, resources are actively managed according to the resource allocation policy that is currently in effect.

  • When the management type is Profile, accounting information is logged according to the resource allocation policy that is currently in effect, but the resources are not actually being managed.

Selected Policy

Displays the resource allocation policy that is currently in effect.

Notification

Displays the status of notification services.

  • When notification is enabled, e-mail messages are sent to the addresses that you specify when selected events are logged.

  • When notification is disabled, no e-mail messages are sent.

For more information about notifications, see Configure Notification Options.

Accounting

Displays the status of accounting data collection.

  • When the accounting status is Enabled, accounting data is logged to the accounting database for review.

  • When the accounting status is Disabled, no accounting data is logged.

For more information about accounting, see Logging Accounting Data in Windows System Resource Manager.

View real-time performance data

Windows System Resource Manager includes Performance Monitor, which is part of the Windows Reliability and Performance Monitor MMC snap-in. When you view Performance Monitor from within Windows System Resource Manager, it displays a custom set of performance counters that help you understand how resource management works and how often your policies change the resource usage of processes on the computer.

To view real-time Windows System Resource Manager performance data in Performance Monitor

  1. Open Windows System Resource Manager.

  2. In the navigation tree, click Resource Monitor. Performance Monitor will open in the console pane.

  3. Review the performance data.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • For more information about using Performance Monitor, see http://go.microsoft.com/fwlink/?LinkId=55156.

  • Windows System Resource Manager

  • Using Windows System Resource Manager


Logging Accounting Data in Windows System Resource Manager

Windows System Resource Manager logs accounting data about applications that are managed by:

  • The managing policy.

  • A policy that is set to profiling.

Accounting data includes details about applications that exceeded the resources that were allocated to them and the changes that the managing policy made. Accounting data is stored in a local accounting database, a remote accounting database on another computer running Windows System Resource Manager, or a SQL database that you specify using a Data Source Name (DSN).

  • Enable or Disable Accounting

  • Change Accounting Settings

  • Archive Accounting Information

  • Customizing Accounting Views

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Enable or Disable Accounting

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To enable or disable accounting

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Enable or click Disable.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Logging Accounting Data in Windows System Resource Manager


Change Accounting Settings

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To change accounting settings

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Windows System Resource Manager, and then click Properties.

  3. On the Accounting tab, click Enable logging of job accounting information.

  4. In Specify how often to log the accounting information, type a value (in minutes).

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Logging Accounting Data in Windows System Resource Manager


Archive Accounting Information

Windows System Resource Manager uses any available disk space to store accounting data. However, Windows System Resource Manager does not automatically overwrite old records or reuse storage space. You must archive and delete accounting data to manage the size of the accounting database.

Important

Deleting archived records does not reduce the disk usage of the accounting database. Use the procedure to shrink the database if your database grows too large.

Because the disk usage of the accounting system increases until you delete old records, you should configure the accounting system to use a volume other than the one the operating system uses. This reduces the chance of the operating system running out of disk space.

Membership in the local Administrators group, or equivalent, is required to complete these procedures.

Archive accounting information

To archive accounting information

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Archive or Delete Information.

  3. In Start Date, select a beginning date for the data to be archived.

  4. In End Date, select an ending date for the data to be archived.

  5. In Computer(s) whose accounting information is to be considered, do one of the following:

    • Click Specify Computer(s) and type a computer name or a comma-separated list of computer names.

    • Click All Computers.

  6. Click Archive Data to configure your archiving options.

  7. In Archive File, type a file name and path for the archived data or click Browse to find the directory where you want to save the archive file.

  8. In File Format, select a file format.

  9. If desired, click to Delete entries from the database.

Reduce the size of the Windows System Resource Manager database

If you archive or delete entries from the database and you want to reduce the amount of disk space used by Windows System Resource Manager accounting, you must shrink the database. This procedure requires downloading and installing two free utilities.

Download and install database utilities

Microsoft SQL Server Native Client

First, download and install the Microsoft SQL Server Native Client. This is a single dynamic-link library (DLL) that contains run-time support for applications that use SQL Server 2005 features.

  • To download the Microsoft SQL Server Native Client for X86 operating systems, see http://go.microsoft.com/fwlink/?LinkId=94787.

  • To download the Microsoft SQL Server Native Client for X64 operating systems, see http://go.microsoft.com/fwlink/?LinkId=94788.

  • To download the Microsoft SQL Server Native Client for IA64 operating systems, see http://go.microsoft.com/fwlink/?LinkId=94789.

Microsoft SQL Server 2005 Command Line Query Utility

Second, download and install the Microsoft SQL Server 2005 Command Line Query Utility. This utility allows you to connect, send Transact-SQL batches, and output rowset information from SQL Server 7.0, SQL Server 2000, and SQL Server 2005 instances.

Note

SQLCMD is a replacement for ISQL and OSQL, but can coexist with installations of ISQL and OSQL.

  • To download the Microsoft SQL Server 2005 Command Line Query Utility for X86 operating systems, see http://go.microsoft.com/fwlink/?LinkId=94790.

  • To download the Microsoft SQL Server 2005 Command Line Query Utility for X64 operating systems, see http://go.microsoft.com/fwlink/?LinkId=94791.

  • To download the Microsoft SQL Server 2005 Command Line Query Utility for operating systems, see http://go.microsoft.com/fwlink/?LinkId=94792.

Use SQL utilities to shrink the database

The following procedure will shrink the native Windows System Resource Manager database.

To shrink the database

  1. On the computer where the accounting database is located, click Start, click All Programs, and then click Accessories.

  2. Right-click Command Prompt, and then click Run as administrator.

  3. At the command prompt, type cd %windir%\system32\windows system resource manager\db and press ENTER.

  4. At the command prompt, type shrinkdb.cmd and press ENTER.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • You must stop the Windows System Resource Manager service before using another application to back up the accounting database.

  • When Accounting is enabled, both Manage and Profile management types generate accounting data.

Additional references

  • Windows System Resource Manager

  • Logging Accounting Data in Windows System Resource Manager

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Customizing Accounting Views

You can use scope, filters, and grouping to sort and customize the view of accounting data in Windows System Resource Manager.

  • Set Accounting Scope

  • Group Accounting Data

  • Filter Accounting Data Before Grouping

  • Filter Accounting Data After Grouping

  • Add or Remove Accounting Columns

  • Sort Accounting Data

  • Logging Accounting Data in Windows System Resource Manager


Set Accounting Scope

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To set the accounting scope

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Filter View.

  3. In Configure Accounting View Filter, click Scope Filter.

  4. Select Start Date, and then select a beginning date for your accounting data.

  5. Select End Date, and then select an ending date for your accounting data. If you do not select End Date, all data from the start date until the current time will be displayed.

  6. Click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • In Configure Accounting View Filter, you can click Save View to save the current accounting view configuration for later use. Then, you can use Load View to load a previously saved configuration, or Reset View to reset the configuration to the default.

Additional references

  • Windows System Resource Manager

  • Customizing Accounting Views


Group Accounting Data

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To group accounting data

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Filter View.

  3. In Configure Accounting View Filter, click Group Items.

  4. In Group items by, select the group in which you want the accounting data to be aggregated.

  5. Repeat this procedure for the remaining menus as necessary, and then click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • In Configure Accounting View Filter, you can click Save View to save the current accounting view configuration for later use. Then, you can use Load View to load a previously saved configuration, or Reset View to reset the configuration to the default.

Additional references

  • Windows System Resource Manager

  • Customizing Accounting Views


Filter Accounting Data Before Grouping

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To filter accounting data before grouping

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Filter View.

  3. In Configure Accounting Filter View, click Filter Before Grouping.

  4. In Define criteria, in the Column name box, select the accounting column you want to filter.

  5. In the Condition box, select the matching condition.

  6. In the Value box, type the value that you want to match.

  7. In the And/Or box, select the logical value.

  8. To add the criteria that you have specified, click Add to list.

  9. When you are finished creating filters, click OK to filter the accounting data.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • In Configure Accounting View Filter, you can click Save View to save the current accounting view configuration for later use. Then you can use Load View to load a previously saved configuration or Reset View to reset the configuration to the default.

Additional references

  • Windows System Resource Manager

  • Customizing Accounting Views


Filter Accounting Data After Grouping

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To filter accounting data after grouping

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Filter View.

  3. In Configure Accounting View Filter, click Filter After Grouping.

    Note

    You cannot select Filter After Grouping until you have used Group Items to group accounting data.

  4. In Define criteria, in the Column name box, select the accounting column that you want to filter.

  5. In Condition, select the matching condition.

  6. In Value, type the value that you want to match.

  7. In And/Or, select the logical value.

  8. To add the criteria that you have specified, click Add to list.

  9. After creating one or more filters, click OK to filter the accounting data.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • In Configure Accounting View Filter, you can click Save View to save the current accounting view configuration for later use. Then, you can use Load View to load a previously saved configuration, or Reset View to reset the configuration to the default.

Additional references

  • Windows System Resource Manager

  • Customizing Accounting Views

  • Group Accounting Data


Add or Remove Accounting Columns

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To add or remove accounting columns

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Filter View.

  3. In Configure Accounting View Filter, click Specify Columns.

  4. To remove an accounting column, click any of the columns that are listed in Displayed columns, and then click Remove.

  5. To add an accounting column, click any of the columns that are listed in Available columns, and then click Add.

  6. To change the order of the displayed columns, click a column that is listed in Displayed columns, and then click Up or Down. Items that are higher on the list are displayed closer to the left side of the accounting data display.

  7. When you are finished adding, removing, and reordering columns, click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • In Configure Accounting View Filter, you can click Save View to save the current accounting view configuration for later use. Then you can use Load View to load a previously saved configuration or Reset View to reset the configuration to the default.

Additional references

  • Windows System Resource Manager

  • Customizing Accounting Views


Sort Accounting Data

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To sort accounting data

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Filter View.

  3. In Configure Accounting View Filter, click Sort Items.

  4. In Sort items by, select a group by which to sort the accounting data.

  5. Select either Ascending or Descending.

  6. Repeat steps 3 and 4 as necessary. When you are finished, click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

  • In Configure Accounting View Filter, you can click Save View to save the current accounting view configuration for later use. Then, you can use Load View to load a previously saved configuration, or Reset View to reset the configuration to the default.

Additional references

  • Windows System Resource Manager

  • Customizing Accounting Views


Configure Notification Options

You can configure Windows System Resource Manager to send e-mail notifications when specified events are written to the Event Log.

Membership in the local Administrators group, or equivalent, is required to complete this procedure.

To configure notification options

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Windows System Resource Manager, and then click Properties.

  3. On the Notification tab, select Enable e-mail notification.

  4. In Notify these e-mail aliases, type your e-mail address, including the domain name (for example, netadmin@contoso.com).

  5. In Use this SMTP server, type the NetBIOS name or the fully qualified domain name (FQDN) of the Simple Mail Transfer Protocol (SMTP) server.

  6. In Select the event log messages, select one or more events. To view the list of events, expand Error, Warning, or Information.

    • When you select Error, Warning, or Information, all of the individual events in that category are included.

    • To clear all of the individual events in a category, select the category again.

    • To select individual events, expand the category, and then select the events.

  7. When you are finished selecting events, click OK.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Using Windows System Resource Manager


Working with Windows System Resource Manager on Remote Systems

  • Remote Accounting Storage

  • Connect to Another Computer Managed by Windows System Resource Manager

    Important

    If Windows System Resource Manager is running in a workgroup and not in a domain, both the client and the service must run as the local Administrator account in order to perform remote administration tasks.


Remote Accounting Storage

You can configure Windows System Resource Manager to store accounting data on a computer other than the computer it is managing. Data can be logged to another computer that is running Windows System Resource Manager, or to a SQL database server with a dedicated database for Windows System Resource Manager accounting.

Other computers running Windows System Resource Manager can also store their accounting data in your local Windows System Resource Manager database, and you can enable or disable their remote storage access.

When multiple computers store their accounting data in a single Windows System Resource Manager database, the accounting history can be reviewed in aggregate, which facilitates the adjustment of resources and workloads among multiple servers.

Membership in the local Administrators group, or equivalent, is required to complete these procedures.

Notes
  • If Windows System Resource Manager is running in a workgroup and not in a domain, both the client and the service must run as the local Administrator account in order to perform remote administration tasks.

Configure the accounting database

The following procedure describes how to change where the local installation of Windows System Resource Manager stores its accounting data.

To set the accounting database

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Set DB Server.

  3. In Accounting database, do one of the following:

    • Select Local WSRM accounting to continue storing accounting data on the local computer. Data will be stored in the directory that you configured in the accounting options.

    • Select Remote WSRM Accounting, and then type the name of the remote computer where you want to store accounting data, or click Browse to find the computer in the network directory.

    • Select SQL accounting, and then type the Data Source Name (DSN) of the SQL Database where you want to store accounting data.

  4. Click OK.

Enable or disable accounting clients

A remote computer that is running Windows System Resource Manager can be configured to store accounting data in your local database. These remote computers are called accounting clients. The following procedure describes how to allow accounting clients to store accounting data in your local database and how to disable accounting clients from storing accounting data in your local database.

To enable or disable accounting clients

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Accounting, and then click Set Accounting Clients.

  3. In the Accounting Client list, select the Status column to enable the accounting client in the same row, or clear the Status column to disable the accounting client on the same row.

  4. To enable or disable all accounting clients, click Enable All or Disable All.

    Note

    Unless your local computer is configured to store accounting data on a different computer, clicking Disable All will also disable accounting storage for the local installation of Windows System Resource Manager.

  5. Click OK. The changes you made are effective immediately.

Additional considerations

  • To open Windows System Resource Manager, click Start, point to Administrative Tools, and then click Windows System Resource Manager. In the Connect to Computer dialog box, select This computer, and then click Connect. Microsoft Management Console will start with the Windows System Resource Manager (Local) snap-in open.

Additional references

  • Windows System Resource Manager

  • Logging Accounting Data in Windows System Resource Manager

  • Working with Windows System Resource Manager on Remote Systems

  • For more technical details about Windows System Resource Manager, see http://go.microsoft.com/fwlink/?LinkId=93726.


Connect to Another Computer Managed by Windows System Resource Manager

To perform remote administration, you can use Microsoft Management Console (MMC) to connect to another computer managed by Windows System Resource Manager.

Membership in the local Administrators group, and in the Administrators group on the target computer, are required to complete this procedure.

Note

If Windows System Resource Manager is running in a workgroup and not in a domain, both the client and the service must run as the local Administrator account in order to perform remote administration tasks.

To connect to another computer managed by Windows System Resource Manager

  1. Click Start, point to Administrative Tools, and then click Windows System Resource Manager.

  2. In the Connect to Computer dialog box, select Another computer, and then type the name of the computer or click Browse to locate the computer in the network directory.

  3. Click Connect.


User Interface: Windows System Resource Manager

  • Windows System Resource Manager Properties

  • Resource Allocation Policy Properties

  • Add or Edit Resource Allocation Dialog Box

  • Process Matching Criteria Properties

  • Add Rule Dialog Box


Windows System Resource Manager Properties

To change management settings, view or edit the lists of programs excluded from management, configure notifications, and set accounting options in Windows System Resource Manager, use the Windows System Resource Manager Properties page.

To open Windows System Resource Manager Properties

  1. Open Windows System Resource Manager.

  2. In the navigation tree, right-click Windows System Resource Manager, and then click Properties.

Tab Details

Management

On the Management tab, you can start or stop management by changing the WSRM management state.

You can also configure basic Windows System Resource Manager options including calendar status, management type, current resource allocation policy, and the calendar default policy.

Exclusion List

Select User-defined or System-defined to view processes that are excluded from management by Windows System Resource Manager.

You can also modify the User-defined exclusion list. For more information, see Work with the User-Defined Exclusion List.

Notification

Configure notification options based on events logged by Windows System Resource Manager. For more information, see Configure Notification Options.

Accounting

Enable or disable logging of job accounting information and configure the logging interval.


Resource Allocation Policy Properties

To view or modify the properties of a resource allocation policy after it has been created, in the navigation tree, right-click the name of the resource allocation policy, and then click Properties.

Common tasks in Resource Allocation Policy Properties

Task Procedure

Change the order of process matching criteria evaluation

On the Resources tab, in Allocate these resources, click the name of the process matching criterion, and then click the up or down arrows to change its position in the list.

Note

Process matches are evaluated in the list from top to bottom. Thus, if a process could match more than one criterion in a resource allocation policy, it will be managed according to the resource allocation associated with the first process matching criterion it matches.

Add a new resource allocation

On the Resources tab, click Add.

For more information about creating resource allocations, see Create a New Resource Allocation Policy.

Edit an existing resource allocation

On the Resources tab, click the name of the process matching criterion to which the resource allocation you want to modify applies, and then click Edit.

For more information about editing an existing resource allocation, see Add or Edit Resource Allocation Dialog Box.

Remove an existing resource allocation

On the Resources tab, click the name of the process matching criterion to which the resource allocation you want to delete applies, and then click Remove.

View the sub-allocation tree

To see a hierarchical view of all resource allocations in the resource allocation policy, on the Resources tab, click View Tree.

View or edit items that are dependent on the resource allocation policy

On the Dependencies tab, you can see calendar events, schedules, and conditions that are dependent on the resource allocation policy.

To edit a dependent item, in the Dependent items list, click the name of the item, and then click Edit.


Add or Edit Resource Allocation Dialog Box

For more information about creating resource allocations, see Create a New Resource Allocation Policy.

Common tasks in the Add or Edit Resource Allocation page

Task Procedure

Choose a process matching criterion

On the General tab, select a process matching criterion from the drop-down list.

Configure a CPU allocation

On the General tab, use the up and down arrows or type a number for the CPU allocation percentage.

For more information about CPU allocations, see Understanding Processor Management in Windows System Resource Manager.

Configure a memory allocation

On the Memory tab, select either Use maximum committed memory for each process or Use maximum working set limit for each process, and type a number for the limit (in MB).

For more information about memory allocations, see Understanding Memory Management in Windows System Resource Manager.

Configure processor affinity

On the Advanced tab, click to select Use specified processors, and then type the number or range of processor numbers in the text box.

For more information about processor affinity, see Understanding Processor Management in Windows System Resource Manager.

Sub-allocate resources

On the Advanced tab, select Standard from the Management Rule drop-down list, and then click Sub-allocate resources.

For more information about sub-allocation, see Sub-Allocate Resources.


Process Matching Criteria Properties

To view or edit the properties of a process matching criterion, in the navigation pane, expand Process Matching Criteria, right-click the name of the criterion you want to view or edit, and then click Properties.

Tab Details

Rules

You can add, edit, or remove rules that are used to match processes to the process matching criterion.

To modify or delete an existing rule, click the rule and then click Edit or Remove.

To create a new rule, click Add.

For more information about creating process matching criteria, see Working with Process Matching Criteria.

Dependencies

When you modify a process matching criterion, you might also want to modify resource allocation policies that are dependent on the criterion. The Dependencies tab lists all of the resource allocation policies on the local computer that identify processes for management using the current process matching criterion.

To view or modify the properties of a dependent resource allocation policy, click the name of the resource allocation policy in the list, and then click Properties.

For more information about editing resource allocation policies, see Add or Edit Resource Allocation Dialog Box.


Add Rule Dialog Box

When you create a new process matching criterion or edit an existing one, you can add a new rule by clicking Add on the Rules tab of the process matching criterion properties page.

Common tasks in the Add Rule dialog box

Task Procedure

Include a file or command line:

  • By typing the full path and file name

  • By typing a regular expression statement

On the Files or Command Lines tab, click a blank line in Included files or command lines, and then type the file name or regular expression you want to match.

For more information about file and command-line matching, see Create a Process Matching Criterion Using Path Matching.

Choose an application or service to include from a list

On the Files or Command Lines tab, click to choose Registered Service, Running Process, Application, or IIS App-Pool from the list in the drop-down box, and then click Select.

Click the name of the matched process you want to include, and then click OK.

Note

You cannot select multiple processes. You must complete this procedure once for each process you want to include.

Exclude a file or command line:

  • By typing the full path and file name

  • By typing a regular expression statement

On the Files or Command Lines tab, click to select Excluded files or command lines.

Next, click a blank line in Excluded files or command lines, and then type the file name or regular expression you want to match.

For more information about file and command-line matching, see Create a Process Matching Criterion Using Path Matching.

Note

Excluding a file or command line in a process matching criterion will only exclude it from management by resource allocations that depend on the process matching criterion. To exclude a file or command line from all management by Windows System Resource Manager, see Work with the User-Defined Exclusion List.

Choose an application or service to exclude from a list

On the Files or Command Lines tab, click to select Excluded files or command lines.

Next, click to choose Registered Service, Running Process, Application, or IIS App-Pool from the list in the drop-down box, and then click Select.

Click the name of the matched process you want to exclude, and then click OK.

Note

You cannot select multiple processes. You must complete this procedure once for each process you want to exclude.

Include a user or group

On the Users or Groups tab, in Included users and groups, click Add.

Note

You might be prompted to enter a user name and password with permission to look up users or groups in your domain.

In the Select Users or Groups dialog box, choose users or groups to include.

Note

Windows System Resource Manager validates users and groups added from the Add Rule dialog box. However, users and groups that are part of an imported process matching criterion are not validated.

For more information about user and group matching, see Create a Process Matching Criterion Using User or Group Matching.

Exclude a user or group

On the Users or Groups tab, click to select Excluded users and groups.

Next, in Excluded users and groups, click Add.

Note

You might be prompted to enter a user name and password with permission to look up users or groups in your domain.

In the Select Users or Groups dialog box, choose users or groups to exclude.

Note

Windows System Resource Manager validates users and groups added from the Add Rule dialog box. However, users and groups that are part of an imported process matching criterion are not validated.

Remove a rule

Click the name of the rule you want to remove, and then click Remove.


Add or Edit Conditional Policy Dialog Box

The Add or Edit Conditional Policy dialog box displays a list of all the conditional policies configured on the computer. To open the Add or Edit Conditional Policy dialog box, in the Windows System Resource Manager navigation pane, right-click Conditions, and then click Add/Edit Conditional Policies.

  • To add a new conditional policy, click Add.

  • To view or modify the properties of an existing conditional policy, click the policy you want to view or modify, and then click Edit.

  • To delete a conditional policy, click the policy you want to delete, and then click Remove.

Additional considerations

You can also open the Add or Edit Conditional Policy dialog box by clicking Action and then clicking Add/Edit Conditional Policies, or by clicking Add/Edit Conditional Policies in the Actions pane.

Additional references

  • Conditional Policy Properties

  • Use Conditions to Adjust Resource Policies


Conditional Policy Properties

You can change the managing policy on a computer managed by Windows System Resource Manager when an event occurs, or when an additional state or combination of states you define is determined to be true after an event occurs.

  • To view or modify the properties of a conditional policy, in the Add or Edit Conditional Policies dialog box, click the policy you want to view or modify in the list, and then click Edit.

  • To create a new conditional policy, in the Add or Edit Conditional Policies dialog box, click Add.

    Note

    Only one conditional policy can be configured for each event category. To create a new processor or memory conditional policy, you must first remove the existing processor or memory conditional policy. If you add a new Cluster services conditional policy, you will be prompted to overwrite the Cluster services conditional policy with which it conflicts.

Common tasks in Conditional Policy Properties

Task Procedure

Create a new conditional policy
  1. In Event Details, click Memory, Processor, or MSCS in the Category drop-down list.

    • If you selected MSCS, click to select a value from the Object Name drop-down list, type the name of the node or resource group in the Object Name cell, and then click to select a value from the Trigger drop-down list.

    • If you selected Processor or Memory, follow the steps to define a state that will trigger a policy change.

  2. Configure the default policy and define a state that will trigger a policy change using the following two procedures.

Configure the default policy associated with the event

Click a resource allocation policy name in the Choose default policy here drop-down list.

Note

The default policy is only applied if no state configured as part of the conditional policy is true.

Define an additional state that will trigger a policy change when an event occurs
  1. Click in an empty row in States to access the details configuration.

  2. In Details for the selected state above, click in an empty cell in the Category column to select a category from the drop-down list.

    • If you selected Processor or Memory, click in the Operator column to choose an operator, and then click in the Quantity column to type a number of processors or a memory quantity (in MB).

    • If you selected MSCS, click to select a value from the Object Name drop-down list, type the name of the node or resource group in the Object Name cell, and then click in the State column to select a state from the drop-down list.

  3. When you are finished creating state details, in States, click the Policy Name column in the row for the state you just created. In the drop-down list, choose a policy to apply when the state is true.

Combine state clauses to create groups
  1. In States, click an empty cell to create a new state, or click an existing state row.

  2. In Details for the selected state above, add multiple states that you want to combine as a single clause to be evaluated true or false.

  3. In Details for the selected state above, click the first row you want to combine with another row, and then press SHIFT+click to select rows to combine.

    Note

    You can only group rows that are consecutive. Nested groups are supported.

  4. Right-click the highlighted rows, and then click Add Group to create a clause.

Change the order in which states are evaluated as true or false

In States, click the state you want to move, and then click the up or down arrows to move it. States at the top of the list are evaluated first.

Enable or disable evaluating a state when the associated event occurs

In States, select the check box in the state row to enable or disable evaluation of the state when the associated event occurs.

Additional references

  • Use Conditions to Adjust Resource Policies

  • Add or Edit Conditional Policy Dialog Box