2. Working with Windows System Resource Manager
Windows Server 2008 R2 includes an additional tool for system
resource management, WSRM, a feature that can be added through Add
Features in Server Manager. WSRM can be used in two ways. First, it
can be used to profile applications. This means that it helps identify
how many resources an application requires on a regular basis. When
operating in this mode, WSRM logs events in the application event log
only when the application exceeds its allowed limits. This helps you
fine-tune application requirements.
The second mode offered by WSRM is the manage mode. In this
mode, WSRM uses its allocation policies to control how many resources
applications can use on a server. If applications exceed their
resource allocations, WSRM can even stop the application from
executing and make sure other applications on the same server can
continue to operate. However, WSRM does not affect any application if
combined processor resources do not exceed 70 percent utilization.
This means that when processor utilization is low, WSRM does not
affect any application.
WSRM also supports Alerts And Event Monitoring. This is a
powerful tool that helps you control processor and memory usage on
large multiprocessing servers. By default, the WSRM includes four
built-in management policies, but it also includes several custom
resources that you can use to define your own policies. Basically,
WSRM ensures that high-priority applications always have enough
resources available to them for continued operation, making it a good
tool for DCs.
Warning
IMPORTANT DCS AND
WSRM
If you use single-purpose DCs, you will not need WSRM as much
as if you use multipurpose DCs. Multipurpose DCs usually run other
workloads at the same time that they run the AD DS service. Using
WSRM in this case can ensure that the AD DS service is available
during peak hours by assigning it more resources than other
applications. However, consider your choices carefully when deciding
to create a multipurpose DC. DCs are secure servers by default and
should remain this way at all times. If you add workloads to a DC,
you must grant access rights to the DC to application
administrators, administrators who do not need domain administration
access rights.
Use WSRM to first evaluate how your applications are being used;
then apply management policies. Make sure you thoroughly test your
policies before applying them in your production environment. This
way, you can get a feel for WSRM before you fully implement it in your
network. When you’re ready, you can use WSRM Calendar to determine
when each policy should be applied.
Warning
IMPORTANT WSRM
RESOURCE REQUIREMENTS
If you are managing several servers with WSRM, you might need
to dedicate resources to it because it is resource-intensive. You
might consider placing it on a dedicated management server if this
is the case.
WSRM can be used for the following scenarios:
-
Use predefined or user-defined policies to manage system resources. Resources can be allocated on a
per-process, per-user, or per-IIS application pool basis. -
Rely on calendar rules to apply your policies at different
times and dates without any manual intervention. -
Automate the resource policy selection process based on
server properties, events, or even changes to available physical
memory or processor count. -
Collect resource usage information in local text files or
store them in a SQL database. You can also create a central WSRM
collection system to collate resource usage from several systems
running their own instances of WSRM.
Table 3 describes
the default policies included in WSRM as well as the custom resources
you can use to create custom policies.
Table 3. WSRM Policies and Custom Resources
BUILT-IN POLICY |
DESCRIPTION |
---|
Equal per process |
Assigns each application an equal amount of
resources. |
Equal per user |
Groups processes assigned to each user who is
running them and assigns equal resources to each
group. |
Equal per session |
Allocates resources equally to each session
connected to the system. |
Equal per IIS application pool |
Allocates resources equally to each running IIS
application pool. |
WSRM can completely control how applications can and should
run.
Practice AD DS Performance Analysis
Practice AD DS Performance Analysis
In this practice, you use both WRPM and WSRM to view the
performance of your servers. First you create a custom collector
set, and then you run it and view the diagnostics report. In the
second exercise, you install WSRM to view the policies it
provides. These exercises rely on SERVER10, but SERVER11 should
also be running.
EXERCISE 1 Create a Data Collector
Set
A data collector set is the core building block of
performance monitoring and reporting in WRPM. You
can create a combination of data collectors and save them as a
single data collector set.
-
Log on to SERVER10 with the domain Administrator
account.
You need to be a member only of the Performance Log
Users group with the Log On As A Batch Job user right, but for
the purpose of these exercises, you use the domain
administrator account. -
In Server Manager, expand Diagnostics\Performance\Data
Collector Sets, right-click User Defined, point to New, and
then click Data Collector Set. -
On the Template page, type Custom
AD DS Collector Set, make sure Create From A Template (Recommended)
is selected, and click Next. -
On the next page, select the Active Directory
Diagnostics template and click Next. -
By default, the wizard selects
%systemdrive%\PerfLogs\Admin as the root directory; however,
you might prefer to keep your collector sets on a separate
drive if one exists. In this case, click Browse, choose drive
D, and create a new folder named AD DS
Collector Sets. Press Enter and click OK to close the
dialog box, and then click Next. -
On the Create The Data Collector Set page, click Change
next to the Run As field, and type the account name TreyResearch\Administrator and the
password to run the data collector set.
When you create collector sets for long-term use, use a
special account that is a member of the Performance Log Users group and has the Log On
As A Batch Job user right to run your collector sets. Note
that the Performance Log Users group has this right assigned
to it by default.
On this final page of the New Collector Set Wizard, you
have three options:
-
Open Properties Data For This Data Collector Set to
view the properties of the data collector set or to make
additional modifications. -
Start This Data Collector Set Now to run the data
collector set immediately. -
Save And Close to save the data collector set
without starting the collection.
Leave the defaults and click Finish.
Your custom data collector set has been created.
Notice that it is stopped. To schedule the Start condition
for your data collector set, use the following procedure
(steps 7 through 10):
-
Right-click Custom AD DS Collector Set and click Properties. -
On the Schedule tab, click Add to create a start date,
time, or day schedule. -
In the Folder Action dialog box, make sure that today’s
date is the beginning date, select the Expiration Date check
box, and set it as one week from today. Also, make sure that
the Start Time is set to the current time. Click OK.
You must set the start date of the schedule to the
current time for the collection set to work. If not, you will
not be able to generate reports in later steps.
Note that you can create quite a modular schedule in
this dialog box. Also note that selecting an expiration date
will not stop data collection in progress on that date. It
only prevents new instances of data collection from starting
after the expiration date. You must use the Stop Condition tab
to configure how data collection is stopped. -
On the Stop Condition tab, select the Overall Duration
check box, make sure it lists 5 minutes, and select the Stop
When All Data Collectors Have Finished check box. Click OK and
type the password for the account you assigned to this
collector set, and then click OK again.
You select the Stop When All Data Collectors Have
Finished check box to enable all data collectors to finish
recording the most recent values before the data collector set
is stopped if you have also configured an overall
duration.
You can also set limits on your collection. However,
note that when an overall duration is configured, it overrides
any limits you set. If you do want to set limits, make sure
the Overall Duration check box is cleared and define the
following limits:
-
To segment data collections into separate logs,
select the Restart The Data Collector Set At Limits check
box. -
To configure a time period for data collection to
write to a single log file, select the Duration check box
and set its value. -
To restart the data collector set or to stop
collecting data when the log file reaches a specific
limit, select the Maximum Size check box and set its
value.
Collector sets generate a large amount of data if
you allow them to run unmonitored. To configure data
management for a data collector set, use the following
procedure (steps 11 through 14):
-
Right-click Custom AD DS Data Collector Set and click Data
Manager. -
On the Data Manager tab, you can accept the default
values or change them according to your data retention policy.
Keep the defaults.
-
Select the Minimum Free disk or Maximum Folders
check boxes to delete previous data according to the
resource policy you choose from the drop-down list (Delete
Largest or Delete Oldest). -
Select the Apply Policy Before The Data Collector
Set Starts check box to delete previous data sets
according to your selections before the data collector set
creates its next log file. -
Select the Maximum Root Path Size check box to
delete previous data according to your selections when the
root log folder size limit is reached.
-
On the Actions tab, you can set specific data management
actions for this collector set. Note that three policies
already exist. Click the 1 Day(s) policy and click
Edit.
Folder actions allow you to specify how data is archived
before it is permanently deleted. You can decide to disable
the Data Manager limits in favor of managing all data
according to these folder action rules. For example, you could
copy all collection sets to a central file share before
deleting them on the local server. -
Click OK, and then click OK again. Type the password for
the account you assigned to the collector set and click
OK.
Your collector set is ready to run. Wait until the
scheduled time occurs for the report to run. However, if you
want to view an immediate report, proceed as follows: -
Right-click your new collector set and click Start. This
generates a new report. -
Expand Diagnostics/Performance/Reports/User Defined/Custom
AD DS Collector Set in the tree pane of Server
Manager; you see that the collection set has generated a
report. Click the report name in the tree pane to view
it.
You can also use the other default templates to generate
immediate reports. For example, if you want to run a report
from the Systems Diagnostics template, right-click the
template name under the System node and select Latest Report.
If no report exists, it runs the collector set and then
displays the report in the details pane.
EXERCISE 2 Install
WSRM
In this exercise, you install the WSRM service and view how
it operates. This exercise is performed on SERVER10; ensure that
it is running.
-
Log on to Server10 with the domain Administrator
account. -
In Server Manager, right-click the Features node and
click Add Features. -
On the Select Features page of the Add Features Wizard,
select Windows System Resource Manager. -
Server Manager prompts you to add Windows Internal
Database. Click Add Required Feature, and then click
Next.
Note that Windows Internal Database is a locally used
database only and does not accept remote connections. To
collect data from other servers, you must use Microsoft SQL
Server 2005 or later. -
Review the information on the Confirm Installation
Selections page and click Install. -
Examine the installation results and click Close.
Your installation is complete. -
You can now use WSRM on this system. Windows System
Resource Manager is a stand-alone console that can be found in
the Administrative Tools program group. -
When you open the console, it asks you which computer to
connect to. Select This Computer and click Connect.
Now you can tour the WSRM interface. (See Figure 7.) Note that
it uses the standard Microsoft Management Console format.
Explore the features of this console.
|