This is accomplished using the Equal per Session policy templates provided with WSRM or specif-ically allocating performance for each guest session, as covered in the “Accessing Hyper-V
Trang 1Equal per IIS Application Pool—Allocates resources equally among all Internet
Information Services (IIS) application pools, preventing one session from consuming
all available CPU and memory resources
NOTE
WSRM policies are only enforced when CPU usage climbs above 70% The WSRM
poli-cies are never active on processes owned by the core operating system or any items in
the exclusion list
TIP
Memor y limits should be applied in policies only when the application, ser vice, or
process is having issues or not allocating memor y usage properly on its own
A common task performed in WSRM is to create matching criteria rules Matching criteria
rules allow an administrator to define (or exclude) processes, services, or applications that
should be monitored by WSRM This definition is used later in the WSRM management
process To create a matching criteria rule, complete the following steps:
1 Launch Windows System Resource Manager by clicking Start, All Programs,
Administrative Tools, Windows System Resource Manager
2 Right-click the Process Matching Criteria item in the WSRM console and select New
Process Matching Criteria
3 Enter a unique name for the matching criteria in the Criteria Name box at the top
and click Add under the Rules section
a Enter the processes, services, or applications in the Included Files or Command
Lines section of the Files or Command Lines tab
Or
b Select the object type (process, service application, or IIS application pool) from
the drop-down list, and click the Select button and select the policy to apply
4 To exclude items from the policy, check the Excluded Files or Command Lines
check box
a Enter the processes, services, or applications in the Included Files or Command
Lines section of the Files or Command Lines tab
Or
b Select the object type (process, service application, or IIS application pool)
from the drop-down list, and click the Select button and select the policy to
apply
5 Repeat the preceding steps to add all the exclusions and items that should be
man-aged by or excluded from a WSRM policy
Trang 2Another task that is commonly performed is creating custom resource-allocation policies
Similar to “matching criteria rules” that look for specific process, service, and application
criteria, the custom resource-allocation policy enables the administrator to define how
much of a resource should be allocated to a specific process, service, or application As an
example, if only 20% of the system processing should be allocated to a print process, the
resource allocation would be defined to limit the allocation of resources to that process To
create a custom resource allocation policy, complete the following steps:
1 Launch Windows System Resource Manager by clicking Start, All Programs,
Administrative Tools, Windows System Resource Manager
2 Right-click the Resource Allocation Policies option in the WSRM console, and select
New Resource Allocation Policy
3 Provide a name for the policy, and click the Add button in the Allocate These
Resources section
4 On the General tab, select the Process Matching Criteria and specify the percentage
of processor time that will apply
5 On the Memory tab, specify the maximum committed memory and working set limits
6 The Advanced tab allows you to select which processors the policy should be
assigned to and to suballocate processor resources If you want to edit these
parame-ters, make the changes and click OK
7 Click OK when you have finished
The calendar component of WSRM can be used to schedule policy enforcement on a reglar
basis and by one-time or recurring events For example, policy enforcement might be
necessary only during normal business hours Calendar control is disabled by default and
can be activated by right-clicking the Calendar item in the WSRM console and selecting
the Enable or Disable option To create calendar items based on scheduled times, complete
the following steps:
1 Launch Windows System Resource Manager by clicking Start, All Programs,
Administrative Tools, Windows System Resource Manager
2 Expand the calendar item in the WSRM console by clicking the plus sign
3 Right-click the Schedule option and select New Schedule
4 Enter a name and description for the schedule
5 Double-click a time slot in the New Schedule window, specify the policy, start time,
and stop time, and then click OK
Instead of creating a calendar item based on scheduled times, you can create the calendar
item based on a specific triggered event To create calendar items based on specific events,
complete the following steps:
1 Launch Windows System Resource Manager by clicking Start, All Programs,
Administrative Tools, Windows System Resource Manager
2 Expand the calendar item in the WSRM console by clicking the plus sign
3 Right-click the Calendar Event option, and select New One Time Event
Trang 34 Enter a name for the event
5 Select Policy Name or Schedule Name, and select the appropriate policy
6 Specify a start and end date and time (not available if associated with a schedule),
and then click OK
For calendar events that you want to trigger based on recurring events, a rule can be
created for this to happen To create recurring events, complete the following steps:
1 Launch Windows System Resource Manager by clicking Start, All Programs,
Administrative Tools, Windows System Resource Manager
2 Expand the calendar item in the WSRM console by clicking the plus sign
3 Right-click the Calendar Event option, and select New Recurring Event
4 Enter a name for the event
5 Select Policy Name or Schedule Name, and select the appropriate policy
6 Specify a start and end time and specify a recurrence schedule, such as every
Monday (not available if associated with a schedule), and then click OK
One example of where WSRM is useful is when an administrator wants to allocate system
resources to sessions or users who are active on a Hyper-V host system Configuring a
WSRM policy for Hyper-V can ensure the sessions will not behave erratically and system
availability will be stabilized for all the guest sessions hosted by the Hyper-V server This is
accomplished using the Equal per Session policy templates provided with WSRM or
specif-ically allocating performance for each guest session, as covered in the “Accessing Hyper-V
Resource Control” section of this chapter To allocate resources to a Windows 2008
Terminal Services system, complete the following steps:
1 Launch Windows System Resource Manager by clicking Start, All Programs,
Administrative Tools, Windows System Resource Manager
2 Expand the Resource Allocation Policies option in the WSRM console, and select
New Resource Allocation Policy
3 Right-click Equal per Session or Equal per User, and select Set as Managing Policy
4 A dialog box opens indicating that the calendar function will be disabled; click OK
5 Click OK
Microsoft Baseline Configuration Analyzer (MBCA)
The Microsoft Baseline Configuration Analyzer (MBCA) is a tool that uses a preestablished
baseline to analyze a system The MBCA is run from a command line and includes several
switches to further customize its use The gathered data is output into a report that can be
reviewed to identify which baselines match and do not match Baseline values are
typi-cally based on best practices for system configuration, security, and so on Systems will
automatically download new baseline models as they are made available on the Microsoft
Update site You can download the MBCA from the System Tools section of the Microsoft
download site at www.microsoft.com/downloads/
Trang 4Assessment and Planning Solution Tool
The Assessment and Planning Solution tool provides a solution to IT personnel when
faced with questions such as “Which product should we buy or deploy?” or “Are we ready
for Windows 2008?.” Granted, there are multiple approaches to tackling questions like
this; however, Microsoft has again developed a tool that will do most of the work for you
The Assessment and Planning Solution tool inventories and assesses systems, hardware,
and software and makes product and technology recommendations based on those results
You can download the Assessment and Planning Solution tool from the Microsoft
down-load site at www.microsoft.com/downdown-loads/
System Center Capacity Planner (SCCP) 2007
System Center Capacity Planner 2007 is a tool for IT staff to plan their migration or
deployment of System Center Operations Manager (OpsMgr) 2007 and Exchange 2007
SCCP can determine and recommend the necessary changes for deploying Exchange 2007
and OpsMgr 2007 This includes in-depth analysis of hardware, network architecture,
placement of servers, and much more SCCP 2007 can even advise on changes after
deployment, whether they are planned or unplanned such as the addition of new users,
new features such as Outlook Web Access (OWA), or changes to the network You can find
more information about SCCP 2007 at www.microsoft.com/systemcenter/sccp/default
mspx
System Center Operations Manager 2007
OpsMgr 2007 has replaced its popular predecessor, Microsoft Operations Manager (MOM)
OpsMgr 2007 is a comprehensive monitoring and reporting solution that reports on
conditions related to services, system, and network performance In addition, it alerts
administrators when problems arise, (for example, when critical services have failed to
start, when CPU usage consistently stays above a designated threshold, or when excessive
paging is observed by the OpsMgr agent) OpsMgr integrates directly with Active
Directory, Windows 2008, and most other Microsoft technologies to provide an overall
solution to help automate monitoring of critical systems and processes OpsMgr uses
management packs specific to the technology, such as Exchange 2007 or IIS 7.0, so little
configuration is needed out of the box
Third-Party Toolset
Without a doubt, many third-party utilities are excellent for capacity-analysis and
perfor-mance-monitoring purposes Most of them provide additional functionality not found in
Windows 2008 Performance Monitor and other tools, but they have a cost and might
have special requirements for deployment and integration into the organization’s
network You might want to evaluate some third-party utilities to get a more thorough
understanding of how they might offer more features than Microsoft solutions Generally
speaking, these utilities enhance the functionality inherent to Microsoft monitoring
solu-tions, such as scheduling, an enhanced level of reporting functionality, superior storage
capabilities, the ability to monitor non-Windows systems, or algorithms for future trend
analysis Table 7.2 lists some of these third-party tools
Trang 5Although it might be true that most third-party capacity-analysis and
performance-moni-toring products might add more or different functionality to your capacity-analysis and
performance-monitoring procedures or goals, there are still pros and cons to using them
over the free tools included with Windows 2008 or other solutions available from
Microsoft The key is to decide what you need to adequately and efficiently perform
capacity-analysis and performance-monitoring procedures in your environment Taking
the time to research and experiment with the different solutions available today, from
Microsoft and others, will only benefit you in making an informed decision for managing
your Windows 2008 environment
Optimizing the Performance of Hyper-V Host
Servers and Guest Sessions
With the various tools covered in the section “Using Capacity-Analysis Tools,” baseline
system performance and capacity analysis will have been identified The next step is to get
into the Hyper-V host and guest sessions and tune the guest sessions so that performance
can be directly managed and optimized The two key areas of resource management that
come in focus are guest session resource allocation and guest session disk image optimization
Resource Allocation to Hyper-V Guest Sessions
For each Hyper-V guest session, a setting allows the allocation of Hyper-V host resources
to the guest session The more resources allocated to a guest session, the more resource
demands the session can make on the resource pool (and thus the more scalable impact
one session could have on another session)
Accessing Hyper-V Resource Control
Resource Control in Hyper-V is allocated in the Virtual Processor section of the settings for
each guest session To go to the Virtual Processor section of a guest session, complete the
following steps:
TABLE 7.2 Third-Par ty Capacity-Planning and Monitoring Tools
Utility Name Company Website
AppManager Suite NetIQ
Corporation
www.netiq.com/products/per formancemgmt/
BMC Per formance Manager BMC
Software
www.bmc.com/
HP OpenView HP www.openview.hp.com/
Robomon Heroix www.robomon.com/
UniCenter NetCenter CA www.ca.com/
Trang 6FIGURE 7.15 Resource Control settings
1 Launch the Hyper-V Manager tool
2 Right-click a virtual machine that you want to view or edit the Resource Control of
and choose Settings
3 In the leftmost pane, click Processor Notice the Virtual Processor screen on the right
side, and note the Resource Control section, as shown in Figure 7.15
Identifying Hyper-V Resource Control Settings
In the Virtual Processor settings, three settings are available to configure resource
alloca-tion for the guest session:
Virtual Machine Reserve (Percentage)—This number (default = 0, but can range
from 0 to 100) is how much of the host server’s available resources the guest session
should be guaranteed If the machine reserve is set to 100, this guest session will get
100% of the resources of the server, and thus no other guest session will be able to
run on this server Consider this number as a “minimum” amount of resources the
guest session should receive, whether it needs that much or not
Virtual Machine Limit (Percentage)—This number (default = 100, but can vary
from 0 to 100) is the percentage maximum that this guest image will take of system
resources When set to 100, it is possible for this guest image to take up 100% of the
resources of the system If you want a guest image to take up no more than 25% of
the resources of the host system at maximum, you should change this number to 25
Remember, however, if you set the limit at 25 and the host server is underutilized
Trang 7and this guest session can use extra resources, the guest session will max out at 25%
despite the guest session’s need or the host server’s capacity to provide the resources
required
Relative Weight—The relative weight (default = 100) is used when a contention
exists between guest sessions on resource control If three guest sessions are all trying
to utilize 100% of the host server resources, based on the relative weight (where the
higher number is given preference over a guest session with a lower number), the
server with the highest number will take a higher priority in resource allocation than
a guest session with a lower relative weight number
Setting Hyper-V Resource Control Options
After deciding how you want to allocate resources to each guest session on the host
system, you configure the settings one by one for each guest session This includes keying
in the requested value for each of the three settings, and then clicking OK to set the
sessions for the guest session Repeat this process for all guest sessions running on the host
server system
Optimizing Disk Configuration for Hyper-V Guest Sessions
Hyper-V guest session disk configurations can significantly impact performance of the
guest session and how that guest session impacts the overall performance of the host
server Two factors should be considered relative to disk configuration: the type of disk
selected, and where the disk image is stored
Choosing Disk Type for Performance Considerations
There are two major differences in disk types in Hyper-V, one is a dynamically expanding
disk, and the other is a fixed-size disk (I note a third in the following bulleted list.) This
disk type is selected at the time the guest image is created; by default, the image type
selected is a dynamically expanding image type After selecting a disk type and installing
the OS on the image, you cannot easily switch to a different disk type However, it is not
impossible to convert a dynamically expanding to fixed or vice versa
At the time of installation, when you are creating a new virtual hard disk (VHD), you are
given the option (as shown in Figure 7.16) to choose a dynamically expanding disk type,
fixed-size disk type, or a differencing disk type The differences are as follows:
Dynamically Expanding—A dynamically expanding disk type allows a disk image
to start off as small as possible, and the image grows (up to a maximum size defined
at the time of configuration; default = 127GB) The advantage of a dynamically
expanding disk type is that it takes up little room on the disk (because the image
may take up only 2GB or 4GB of space to start) As the image demand grows, the
size of the image file grows
Fixed Size—The fixed-size disk is one where the size of the disk image is selected at
the time of installation, whether that is 10GB or 20GB or 100GB The disk space is
immediately allocated regardless of whether the guest session uses that amount of
space So, if 100GB is allocated to the fixed size of a guest image, the guest image
will take up 100GB of disk space
Trang 8FIGURE 7.16 Choosing the disk type
Differencing—The differencing disk type is one where an existing image already
exists, and only changes specific to this guest session image are stored for the guest
session This option is used for servers that are pretty much identical and not likely
change much The organization can reduce the amount of disk space taken up by
having multiple servers each taking up 2GB or 4GB of space when a single image of,
say, 2GB can be shared by multiple guest sessions
NOTE
This VHD Configuration Wizard comes up only when creating a new VHD, not when
cre-ating a new guest image When crecre-ating a new guest image, the default disk image
type is set to dynamic if you choose New Disk If you choose an existing vir tual disk,
you can choose a fixed disk that has already been created via the VHD Configuration
Wizard
As stated previously, a dynamically expanding disk type allows for a guest image to start
off small and grow as needed From a performance perspective, however, every time the
image needs to grow, it has a drastic impact on the guest session and the host server
Fixed-size disks images take up a static amount of disk space whether the space is needed
or not And even though the space might not be needed, at least the image will not grow
during the production day and cause performance impact on the server So, for the best
performance, choose the fixed-size disk type
Trang 9Choosing the Location for Disk Images for Performance Considerations
The other key factor when considering performance on a Hyper-V host system is the
storage location of disk images If disk images are stored all on the C: drive of the host
server, and the disk is not a fast disk, all the guest images shairng a single slow disk are
impacted If the guest images are stored on a remote disk subsystem, such as an iSCSI
storage area newtork (SAN) server, the communication speed between the Hyper-V host
and the iSCSI SAN is not that fast, and so again, there is a performance impact on guest
session operation
If the guest sessions are stored on a high-speed FibreChannel SAN with extremely high
read/write performance (both on the disk and the connectivity between the host and the
high-speed SAN), however, the performance of the guest images is enhanced
Take great care when considering where to store disk images Your decision will impact the
overall performance of the guest images and the host server managing the guest image
sessions
Monitoring System Performance
Capacity analysis is not about how much information you can collect; it is about
collect-ing the appropriate system health indicators and the right amount of information
Without a doubt, you can capture and monitor an overwhelming amount of information
from performance counters There are more than 1,000 counters, so you’ll want to
care-fully choose what to monitor Otherwise, you might collect so much information that the
data will be hard to manage and difficult to decipher Keep in mind that more is not
necessarily better with regard to capacity analysis This process is more about efficiency
Therefore, you need to tailor your capacity-analysis monitoring as accurately as possible to
how the server is configured
Every Windows 2008 server has a common set of resources that can affect performance,
reliability, stability, and availability For this reason, it’s important that you monitor this
common set of resources, namely CPU, memory, disk, and network utilization
In addition to the common set of resources, the functions that the Windows 2008 server
performs can influence what you should consider monitoring So, for example, you would
monitor certain aspects of system performance on file servers differently than you would
for a domain controller (DC) Windows 2008 can perform many functional roles (such as
file and print sharing, application sharing, database functions, web server duties, domain
controller roles, and more), and it is important to understand all those roles that pertain
to each server system By identifying these functions and monitoring them along with the
common set of resources, you gain much greater control and understanding of the system
The following sections go more in depth on what specific items you should monitor for
the different components that constitute the common set of resources It’s important to
realize, however, that several other items should be considered regarding monitoring in
Trang 10addition to the ones described in this chapter Consider the following material as just a
baseline of the minimum number of things to begin your capacity-analysis and
perfor-mance-optimization procedures
Key Elements to Monitor for Bottlenecks
As mentioned, four resources compose the common set of resources: memory and pagefile
usage, processor, disk subsystem, and network subsystem They are also the most common
contributors to performance bottlenecks A bottleneck can be defined in two ways The
most common perception of a bottleneck is that it is the slowest part of your system It
can either be hardware or software, but generally speaking, hardware is usually faster than
software When a resource is overburdened or just not equipped to handle higher
work-load capacities, the system might experience a slowdown in performance For any system,
the slowest component of the system is, by definition, considered the bottleneck For
example, a web server might be equipped with ample RAM, disk space, and a high-speed
network interface card (NIC), but if the disk subsystem has older drives that are relatively
slow, the web server might not be able to effectively handle requests The bottleneck (that
is, the antiquated disk subsystem) can drag the other resources down
A less common, but equally important form of bottleneck, is one where a system has
significantly more RAM, processors, or other system resources than the application
requires In these cases, the system creates extremely large pagefiles and has to manage
very large sets of disk or memory sets, yet never uses the resources When an application
needs to access memory, processors, or disks, the system might be busy managing the idle
resource, thus creating an unnecessary bottleneck caused by having too many resources
allocated to a system Thus, performance optimization not only means having too few
resources, but also means not having too many resources allocated to a system
Monitoring System Memory and Pagefile Usage
Available system memory is usually the most common source of performance problems on
a system The reason is simply that incorrect amounts of memory are usually installed on
a Windows 2008 system Windows 2008 tends to consume a lot of memory Fortunately,
the easiest and most economical way to resolve the performance issue is to configure the
system with additional memory This can significantly boost performance and upgrade
reliability
Many significant counters in the memory object can help you determine system memory
requirements Most network environments shouldn’t need to consistently monitor every
single counter to get accurate representations of performance For long-term monitoring,
two very important counters can give you a fairly accurate picture of memory pressure:
Page Faults/sec and Pages/sec memory These two memory counters alone can indicate
whether the system is properly configured with the proper amount of memory Table 7.3