Tải bản đầy đủ (.pdf) (68 trang)

Tài liệu Module 6: Monitoring and Optimizing a Web Server pptx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.53 MB, 68 trang )




Contents
Overview 1
Optimizing a Web Server 2
Monitoring and Optimizing Memory
Usage 14
Monitoring and Optimizing Processor
Activity 19
Monitoring and Optimizing the Available
Network Bandwidth 25
Managing Log Files 29
Lab A: Monitoring Log Files 37
Optimizing a Web Site 41
Lab B: Monitoring Performance on an IIS
Server 49
Review 60

Module 6: Monitoring
and Optimizing a Web
Server

Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is electronic, permission to print one copy is hereby granted.


Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001 Microsoft Corporation. All rights reserved.

Microsoft, Active Directory, ActiveX, BackOffice, FrontPage, MS-DOS, Outlook, PowerPoint,
SQL Server, Visual Basic, Visual InterDev, Visual SourceSafe, Visual Studio, Windows, Win32,
Windows Media, and Windows NT are either registered trademarks or trademarks of Microsoft
Corporation in the U.S.A. and/or other countries.

Other product and company names mentioned herein may be the trademarks of their respective
owners.


Module 6: Monitoring and Optimizing a Web Server iii

Instructor Notes
This module provides students with the knowledge and skills that are necessary
to monitor and optimize a Web server.
After completing this module, students will be able to:
 Optimize a Web server.
 Monitor and optimize memory usage.
 Monitor and optimize processor activity.
 Monitor and optimize the available network bandwidth.
 Manage log files.
 Optimize a Web site.

Materials and Preparation

This section provides the materials and preparation tasks that you need to teach
this module.
Required Materials
To teach this module, you need the Microsoft® PowerPoint® file 2295a_06.ppt.
Preparation Tasks
To prepare for this module, you should:
 Read all of the materials for this module.
 Complete the labs.
 Read the white paper, The Art and Science of Web Server Tuning with
Internet Information Services 5.0, under Additional Reading on the Web
page on the Student Materials compact disc.
 Read the white paper, Web Server Capacity Planning, under Additional
Reading on the Web page on the Student Materials compact disc.
 Read Appendix B, “Transmission Rate Counters,” in Course 2295A,
Implementing and Supporting Microsoft Internet Information Services 5.0.

Presentation:
90 Minutes

Labs:
75 Minutes
iv Module 6: Monitoring and Optimizing a Web Server

Demonstration
This section provides demonstration procedures that will not fit in the margin
notes or are not appropriate for the student notes.
Building a Test Script
 To prepare for the demonstration
1. Review the procedure for installing the Exploration Air Demo Web site.
2. Review the procedure for installing the Microsoft Web Application Stress

Tool.
3. Review the procedure for creating a script by using the Web Application
Stress Tool.

Module Strategy
Use the following strategy to present this module:
 Optimizing a Web Server
This topic outlines several considerations for optimizing a Web server.
Explain how to plan Web server capacity by estimating the network traffic
for a Web server and considering the impact that Web page elements have
on available network bandwidth and on CPU, memory, and hard disk
performance. Demonstrate the procedures for limiting connections to a Web
site and enabling Hypertext Transfer Protocol (HTTP) compression to
improve transmission speed.
When discussing how to monitor and optimize Web applications, open
System Monitor and point out each of the performance counters that are
listed in the table for the Microsoft Active Server Pages and the Web
Service performance objects. Next, describe the techniques that you can use
to improve Web application performance, and then explain how
implementing Network Load Balancing can reduce the risk of an application
failure even if a Web server is attacked or it experiences a forced failure.
Finally, describe the performance counters that you can use to gather
baseline information about Web server performance.
 Monitoring and Optimizing Memory Usage
This topic describes how to monitor memory usage to determine whether
your Web server has adequate physical memory for Microsoft Internet
Information Services (IIS) 5.0 to run efficiently. Explain how to use the
Memory performance object in System Monitor to monitor physical and
paged memory. Next, discuss the ways in which you can optimize memory
usage without adding memory to your Web server.

Module 6: Monitoring and Optimizing a Web Server v

 Monitoring and Optimizing Processor Activity
This topic describes how to monitor and optimize processor activity when
one or more processes use a large percentage of processor time. Describe
the performance counters that you can use to identify potential processor
bottlenecks. Explain how to improve performance if the processor activity
level is too high. Next, demonstrate the procedure for enabling process
throttling. Finally, describe the performance counters that you can use to
monitor IIS 5.0 service connections, explain the procedure for disabling
HTTP Keep-Alives, and discuss the process of identifying a processor
bottleneck by analyzing connection data.
 Monitoring and Optimizing the Available Network Bandwidth
 This topic describes how to monitor and optimize the available network
bandwidth to ensure optimal usage. Explain the ways in which bandwidth is
measured, and describe the performance counters for each of the Open
Systems Interconnectivity (OSI) layers, which are listed in Appendix B,
“Transmission Rate Counters,” in Course 2295A, Implementing and
Supporting Microsoft Internet Information Services 5.0.
Next, describe the guidelines for interpreting data provided by transmission
rate performance counters. Finally, demonstrate the procedure for enabling
bandwidth throttling to limit the bandwidth used by Web and File Transfer
Protocol (FTP) services on your computer.
vi Module 6: Monitoring and Optimizing a Web Server

 Managing Log Files
This topic describes how to enable and manage log files for a Web site to
collect information about user activity. Describe the log file formats that are
available when you enable logging on a Web or FTP site. Demonstrate the
procedures for enabling logging on a Web or FTP site, configuring logging

for a specific directory, and setting logging properties. Next, demonstrate
the procedure for enabling process accounting to log resource usage by a
Web site. Then, describe the strategy for setting up Open Database
Connectivity (ODBC) logging and describe the procedure for converting log
files to other formats.
 Optimizing a Web Site
This topic describes the ways in which you can optimize the performance of
your Web site. Explain how to test a Web site using the Microsoft Web
Application Stress Tool, which needs to be installed on the master client
computer. You must not install the Web Application Stress Tool on the Web
server you are testing because doing so may interfere with your results.
Describe the different methods for creating test scripts, and then
demonstrate how to build a test script by using the Web Application Stress
Tool. In this demonstration, you will install the Exploration Air Demo Web
site, and then you will install the Web Application Stress Tool and build the
script by clicking on the links in the Exploration Air Web site.

Tell the students that they should not perform the demonstration steps
on their own computers. Doing so will prevent them from being able to
perform the next lab. The steps in the manual have been provided for future
reference, if necessary.

Next, explain the strategies that you can use to optimize the performance of
your Web site. In addition, describe the security considerations and the
procedure for setting Microsoft Windows
® 2000 as an application server to
improve Web site performance.
Finally, describe how to use the Performance tuning slider on the
Performance property sheet to specify the amount of memory that IIS will
reserve in its cache.


Customization Information
This section identifies the lab setup requirements for a module and the
configuration changes that occur on student computers during the labs. This
information is provided to assist you in replicating or customizing Training and
Certification courseware.
This module includes only computer-based interactive lab exercises and, as a
result, there are no lab setup requirements or configuration changes that affect
replication or customization.

The labs in this module are also dependent on the classroom
configuration that is specified in the Customization Information section at the
end of the Classroom Setup Guide for Course 2295A, Implementing and
Supporting Microsoft Internet Information Services 5.0.


Note
Importan
t

Module 6: Monitoring and Optimizing a Web Server 1

Overview
 Optimizing a Web Server
 Monitoring and Optimizing Memory Usage
 Monitoring and Optimizing Processor Activity
 Monitoring and Optimizing the Available Network
Bandwidth
 Managing Log Files
 Optimizing a Web Site


*****************************
ILLEGAL FOR NON-TRAINER USE******************************
To optimize Web server performance, you must examine every part of the
system for potential performance problems. Performance problems can be
caused by inadequate or improperly configured hardware or by software
settings in either Microsoft
® Internet Information Services (IIS) 5.0 or
Microsoft Windows
® 2000. You can use the tools included in IIS and
Windows 2000 to monitor Web server performance. After you gather and
analyze performance data, you can determine the cause of performance
problems and make any necessary changes.
After completing this module, you will be able to:
 Optimize a Web server.
 Monitor and optimize memory usage.
 Monitor and optimize processor activity.
 Monitor and optimize the available network bandwidth.
 Manage log files.
 Optimize a Web site.

Topic Objective
To provide an overview of
the module topics and
objectives.
Lead-in
In this module, you will learn
about monitoring and
optimizing Web server
performance.

2 Module 6: Monitoring and Optimizing a Web Server



 Optimizing a Web Server
 Planning Web Server Capacity
 Configuring Web Server Capacity
 Monitoring and Optimizing Web Applications
 Implementing Network Load Balancing
 Gathering Baseline Information

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
To optimize a Web server, you must first plan Web server capacity by
estimating the network traffic for your Web server and considering the impact
that Web page elements have on available network bandwidth and on CPU,
memory, and hard disk performance. You can then configure Web server
capacity by limiting the number of simultaneous connections to the Web server
and by enabling Hypertext Transfer Protocol (HTTP) compression to improve
transmission speed.
You can use System Monitor, which is part of the Performance tool in
Windows 2000, to monitor application performance. In addition, you can use
several techniques to increase the speed and efficiency of your Web
applications. Finally, you can gather baseline information to track the
performance of your Web server.

For more information about optimizing a Web server, see the
white paper, The Art and Science of Web Server Tuning with Internet
Information Services 5.0, under Additional Reading on the Web page on the
Student Materials compact disc.


Topic Objective
To outline the topics that are
relevant to optimizing a Web
server.
Lead-in
There are several
considerations for optimizing
a Web server.
Delivery Tip
Refer students to the white
paper, The Art and Science
of Web Server Tuning with
Internet Information
Services 5.0, under
Additional Reading on the
Web page on the Student
Materials compact disc.
Note
Module 6: Monitoring and Optimizing a Web Server 3

Planning Web Server Capacity
To Plan Web Server Capacity:
To Plan Web Server Capacity:
To Plan Web Server Capacity:
 Estimate network traffic on your Web server
 Consider the impact that Web page elements
have on available network bandwidth and on
CPU, memory, and hard disk performance
~

~
~


~
~
~


~
~
~
~
~
~


~
~
~


~
~
~
~~~ ~~~ ~~~
Web Server

*****************************
ILLEGAL FOR NON-TRAINER USE******************************

To ensure a successful implementation of IIS, your Web server must have
adequate capacity to handle the network traffic. You must plan Web server
capacity so that your hardware and software meets current needs and can be
expanded or upgraded as traffic increases.
Network Traffic and Connection Types
Traffic on a Web server is the combination of incoming requests from browsers
and outgoing responses. Web sites periodically experience high activity levels,
thus the traffic load is variable. The more visitors your site has and the larger
the pages it provides, the more network bandwidth your server requires.
The following table describes the traffic that is generated by a typical request
for a 5-kilobyte (KB) page.
Traffic type Bytes sent

Transfer Control Protocol (TCP)
connection
180 (approximate)
Client GET request 256 (approximate)
5-KB page 5,120
Protocol overhead 1,364 (approximate)

Topic Objective
To outline the necessary
considerations for planning
Web server capacity.
Lead-in
Estimate the network traffic
for your Web server to plan
Web server capacity.
4 Module 6: Monitoring and Optimizing a Web Server


The following table describes different connection types, their speeds, and the
number of 5-KB pages sent per second.


Connection type


Connection speed
Approximate number
of 5-KB pages sent
per second

Dedicated Point-to-Point
Protocol/Serial Line Internet Protocol
(PPP/SLIP) by using a modem
28.8 kilobits per
second (Kbps)
½ page
Frame Relay or fast modem 56 Kbps 1 page
Integrated Services Digital Network
(ISDN)
128 Kbps 2 pages
Typical Digital Subscriber Line (DSL) 640 Kbps 11 pages
DS1/T1 1.536 megabits per
second (Mbps)
28 pages
10-megabit (Mb) Ethernet 8 Mbps 136 pages
DS3/T3 44.736 Mbps 760 pages
OC1 51.844 Mbps 880 pages
100-Mb Ethernet 80 Mbps 1,360 pages

OC3 155.532 Mbps 2,650 pages
OC12 622.128 Mbps 10,580 pages
1-gigabit per second (Gbps) Ethernet 800 Mbps 13,600 pages


Adding graphics to a page increases the page size and therefore reduces
the number of pages sent. For example, a graphic that is 2x2 inches in size adds
10 KB or more to the page size.

Note
Module 6: Monitoring and Optimizing a Web Server 5

Considerations for Web Server Capacity
Several other factors impact the capacity of your Web server: the number of
applications running on the server, the use of Secure Sockets Layer (SSL), and
various Web page elements.
You can limit the number of services and other applications running on the
Web server to reduce their impact on central processing unit (CPU) time. In
addition, when a browser makes an SSL request for a page, a delay occurs
while the server encrypts the page. When the server sends the page, SSL adds
additional network overhead. Some performance is lost because SSL disables
proxy and browser caching to enhance security. Therefore, use SSL only when
necessary, and use it only on the specific pages to which it applies, rather than
on an entire site.
The following table lists different Web page elements and the hardware
components that are affected by them: available network bandwidth and CPU,
memory, and hard disk performance.
Web page element Affects

Graphics Available network bandwidth

Web applications CPU time
Streaming multimedia Available network bandwidth
Database lookups CPU time, memory, hard disk, available network bandwidth

To maximize the number of pages sent you can:
 Remove some images from the page.
 Use smaller pictures if possible, or compress the existing pictures.
 Provide reduced-size images with links to larger ones, or use a compact file
type, such as a .gif or a .jpg file, to replace a large file type, such as a .tif
file.
 Connect to the network by using a faster interface.


For more information about optimizing a Web server, see the white
paper, Web Server Capacity Planning, under Additional Reading on the Web
page on the Student Materials compact disc.

Delivery Tip
Refer students to the white
paper, Web Server Capacity
Planning, under Additional
Reading on the Web page
on the Student Materials
compact disc.
Note
6 Module 6: Monitoring and Optimizing a Web Server

Configuring Web Server Capacity
Set Connection
Limit

Enable HTTP
Compression

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
You can configure Web server capacity by limiting the number of connections
on the server to improve memory usage, and by enabling HTTP compression to
compress and cache static files and compress dynamically generated files on
demand.
Setting Connection Limits
You can limit the number of simultaneous connections to a Web site. All
connection attempts beyond the connection limit are rejected. In addition, you
can set a time-out value to conserve resources for other services that use the
same connection or for other applications that use the same computer.
When you limit connections to an individual Web site, it is important to
remember that, for a single user, most browsers make up to four simultaneous
connections to download text and graphics from a page. Therefore, it is
recommended that you specify connection limits in increments of four. For
example, if you only want ten users to be able to connect to your site at the
same time, set the connection limit to 40.
When a browser stops working unexpectedly or a connection is lost in
midstream, the site continues to process data until the timeout value is reached.
To minimize the loss of processing resources from broken connections, you can
reduce the timeout value.
To limit the number of connections to your Web site:

1. Click Start, point to Programs, point to Administrative Tools, and then
click Internet Services Manager.
In Administrative Tools, the IIS console is called Internet Services
Manager; however, when you open the console, it’s called Internet

Information Services, otherwise known as the IIS snap-in.
2. In the IIS snap-in
, in the console tree, right-click the name of the Web site
that you want to configure, and then click Properties.
Topic Objective
To describe procedures for
configuring Web server
capacity.
Lead-in
To configure Web server
capacity, you can limit the
number of simultaneous
connections to the Web
server and enable HTTP
compression to improve
transmission speed.
Delivery Tip
Demonstrate the procedure
for limiting connections to a
Web site.
Module 6: Monitoring and Optimizing a Web Server 7

3. On the Web Site tab, under Connections, click Limited to, and then in the
Limited to box, type the maximum number of simultaneous connections
that you want to allow.
4. In the Connection Timeout box, type the connection timeout value, and
then click OK.

Enabling HTTP Compression
When IIS receives a request, it checks to see if the browser is compression-

enabled. IIS then checks the file name extension to determine whether the
requested file contains either static or dynamic content. If the file contains static
content, IIS checks to see if the file is already stored in a compressed format in
the cache. If it is, IIS sends the compressed file to the browser. If the file is not
stored in a compressed format, IIS sends the uncompressed file to the browser
and adds a compressed copy of the file to the cache. If the file contains dynamic
content, IIS compresses the file as it is generated and sends the compressed file
to the browser. No copy of the file is stored.
HTTP compression provides faster transmission time between compression-
enabled browsers and IIS. You can compress static files alone, or you can
compress both static and dynamic files. If your network bandwidth is restricted,
you should consider HTTP compression, at least for static files, unless your
processor utilization is already extremely high (80 percent or more).
To enable HTTP compression:
1. In the IIS snap-in, right-click server_name (where server_name is the name
of your Web server), and then click Properties.
2. On the Internet Information Services tab, under Master Properties, select
WWW Service, and then click Edit.
3. In the WWW Service Master Properties for server_name dialog box, on
the Service tab, under HTTP Compression, select the Compress static
files check box to compress static files.
4. To compress dynamic files, select the Compress application files check
box.
5. To specify the local directory in which compressed files will be stored,
either type the path to the directory in the Temporary folder box, or click
Browse to locate the directory.

The directory must be on a local drive, and it must be on an NTFS
file system partition. The directory cannot be shared or compressed.


6. Under Maximum temporary folder size, click Unlimited, or you can limit
the folder size by clicking Limited to, and then typing a number (in
megabytes [MB]) in the Limited to box.
7. Click OK.

Delivery Tip
Demonstrate the procedure
for enabling HTTP
compression. Emphasize
that this procedure is
performed on the Web
server.
Note
8 Module 6: Monitoring and Optimizing a Web Server

Monitoring and Optimizing Web Applications
Monitoring Web Applications
Monitoring Web Applications
Monitoring Web Applications
 Use counters in the
Active Server Pages
performance object to
monitor ASP
applications
 Use counters in the Web
Service performance
object to monitor CGI
and ISAPI applications
Optimizing Web Applications
Optimizing Web Applications

Optimizing Web Applications
 Convert CGI applications to
ASP or ISAPI applications
 Use static files
 Disable debugging for ASP
 Set Expires headers for
images and HTML pages
 Use SSL only when
necessary
 Run Web applications in
isolated processes
 Convert ASP scripts to
COM objects

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
Because dynamic Hypertext Markup Language (HTML) pages, or Web
applications, have much higher overhead than static HTML pages, their
performance has a significant impact on Web server capacity. By monitoring
applications and estimating their overhead during periods of varying activity,
you can ensure that your server is prepared for periods of increased workload.
Monitoring Web Applications
You can use System Monitor to monitor the performance of Active Server
Pages (ASP), Common Gateway Interface (CGI), and Internet Server
Application Program Interface (ISAPI) Web applications. System Monitor
provides a graphic display of counter readings and is part of the Performance
tool in Windows 2000.

For more information about using System Monitor, see Windows 2000
Help.


The following table lists counters for the Active Server Pages performance
object. Use these counters to monitor ASP application performance.
Performance counter Description

Requests/Sec The number of requests executed per second. If this
counter is low during periods of increased traffic on your
server, the applications may be causing a bottleneck.
Requests Executing The number of requests currently executing.
Request Wait Time The number of milliseconds that the most recent request
was waiting in the queue.
Request Execution Time The number of milliseconds that it took to execute the
most recent request.
Requests Queued The number of requests in the queue waiting for service.

Topic Objective
To explain how to monitor
and optimize Web
applications in IIS 5.0.
Lead-in
You can use System
Monitor to monitor
application performance.
There are also several
techniques that you can use
to increase the speed and
efficiency of your Web
applications.
Note
Delivery Tip

Open System Monitor and
point out each of the
performance counters that
are listed in the table for the
Active Server Pages
performance object.
Module 6: Monitoring and Optimizing a Web Server 9

The following table lists performance counters that are included in the Web
Service performance object. You can use these performance counters to monitor
the performance of CGI and ISAPI applications.
Performance counter Description

CGI requests/sec The number of CGI requests executed per second.
ISAPI Extension
requests/sec
The number of ISAPI Extension requests executed per
second.
Get requests/sec The number of HTTP requests that are made using the GET
method that are executed per second. GET requests are
generally used for basic file retrievals or image maps,
although they can be used with forms.
Post requests/sec The number of HTTP requests that are made using the POST
method that are executed per second. POST requests are
generally used for forms or gateway requests.

Optimizing Web Applications
If you want to improve Web application performance, consider using the
following optimization techniques:
 Convert CGI applications to ASP scripts or ISAPI applications. Scripts in

ASP pages and ISAPI applications are optimized to run on Windows 2000.
CGI applications are less efficient.
 Use static files whenever possible. Running Web applications takes more
processing time than serving static pages. If you are generating pages
dynamically to satisfy user preferences, consider substituting as many as 10
or 20 different static variations for a single dynamically-generated page. If
you are generating pages dynamically to provide frequently updated data,
consider redesigning your application so that it generates a single dynamic
page on a fixed schedule and then stores that page for retrieval until the next
update.
 Make sure that debugging for ASP is turned off on your production servers.
 Set Expires headers for all images and for HTML pages to allow them to be
stored in the client’s cache. The Expires header is an expiration date or time
for files sent by the server.
 Use SSL only when necessary.
 Run Web applications in isolated processes to minimize the risk of server
failure due to an application problem.
 Convert scripts in ASP pages to Component Object Model (COM) objects.
Converting ASP scripts that are longer than 100 lines to COM objects can
significantly increase processing speed.

Delivery Tip
Open System Monitor and
point out each of the
performance counters that
are listed in the table for the
Web Service performance
object.
Delivery Tip
Describe the techniques that

you can use to improve Web
application performance.
10 Module 6: Monitoring and Optimizing a Web Server

Implementing Network Load Balancing
To Implement Network Load Balancing:
To Implement
To Implement
Network Load Balancing
Network Load Balancing
:
:
 Determine which applications to use
 Identify network risks
Network Load
Balancing Cluster
 Configure the Network Load Balancing cluster

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
High availability is critical for e-commerce sites and other Internet businesses.
Network Load Balancing reduces the chance of application failure by
duplicating server programs among a cluster of computers. This cluster
configuration reduces the chance of an application failure even if a Web server
is attacked or experiences a forced failure.
Network Load Balancing is a part of the Microsoft Windows 2000 Advanced
Server clustering solution and enhances the availability and scalability of Web
servers, FTP servers, streaming media servers, virtual private network (VPN)
servers, and mission-critical programs.
Topic Objective

To describe how Network
Load Balancing can be used
to ensure the availability of
an application.
Lead-in
Network Load Balancing
ensures that the forced
failure of a single server will
not result in a failure of the
application.
Module 6: Monitoring and Optimizing a Web Server 11

Consider the following when determining whether to implement Network Load
Balancing for resources exposed on the Internet:
 Determine which applications to use with Network Load Balancing.
Network Load Balancing supports only applications that use Transmission
Control Protocol/Internet Protocol (TCP/IP) as their network protocol. For
proper configuration, the application must be associated with specific
transport protocols, TCP or User Datagram Protocol (UDP), and ports.
 Identify network risks.
Deploy Network Load Balancing where you identify single points of failure
that could interrupt access to essential network resources. If the application
is mission-critical to your organization, ensure that the application can
continue to run in the event that a component stops responding. The
determination of mission-critical applications varies between organizations.

You can also protect a Web site against failure by using additional
measures, such as implementing Redundant Array of Independent Disks
(RAID) and assuring that backups occur.


 Configure the Network Load Balancing cluster.
Configure a common address that will be assigned to all members of the
Network Load Balancing cluster and define the load size for each server in
the cluster. The load size determines what percentage of all incoming traffic
will be sent to a specific member of the cluster. Setting the load size allows
a higher percentage of total traffic to be directed to more powerful servers in
the cluster.

For more information on clustering, see Course 2087A, Implementing
Microsoft Windows 2000 Clustering


Ti
p

Note
12 Module 6: Monitoring and Optimizing a Web Server

Gathering Baseline Information
Generate a Baseline Log During Ordinary Conditions
Generate a Baseline Log During Ordinary Conditions
Generate Another Baseline Log Whenever You Upgrade
Generate Another Baseline Log Whenever You Upgrade
Web Server
Use Performance
Counters to
Gather Baseline
Information
Use Performance
Use Performance

Counters to
Counters to
Gather Baseline
Gather Baseline
Information
Information

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
You can use a number of performance counters to generate a baseline log that
identifies the characteristics of your server under ordinary conditions. Log data
for at least one week of normal operation to ensure that you have enough
information in your baseline. Then, generate another baseline log whenever you
upgrade and compare it to previous logs to determine the effect that your
upgrade has had on performance and capacity.
The following table describes the performance counters that you can use to
gather baseline information on your Web server.
Object: Counter Description

Memory: Pages/sec The number of pages read from or written to disk to resolve
hard page faults. If the server does not have enough memory to
handle its workload, this number will be consistently high. A
value from 0 through 20 is preferred. A value greater than 80
indicates insufficient random access memory (RAM).
Memory: Available
Bytes
The amount of physical memory available to processes running
on the computer. A value of at least 4 MB is preferred.
Memory:
Committed Bytes

The amount of physical memory for which space has been
reserved on the disk paging file. This value must not be more
than 75 percent of physical memory size.
Memory: Pool
Nonpaged Bytes
The number of bytes in the nonpaged pool, an area of system
memory for objects that cannot be written to disk, but must
remain in physical memory as long as they are allocated. This
value must remain steady. A slow rise in this value may
indicate a memory leak.
System: Context
Switches/sec
The combined rate at which all processors on the computer are
switched from one thread to another. This value must be as low
as possible.

Topic Objective
To describe the
performance counters that
can be used to gather
baseline information on a
Web server.
Lead-in
You can gather baseline
information to help you track
the performance of your
Web server.
Delivery Tip
Provide descriptions of the
performance counters that

you can use to gather
baseline information.
Module 6: Monitoring and Optimizing a Web Server 13

(continued)
Object: Counter Description

Processor:
% Processor Time
The percentage of time that the processor is executing a non-
idle thread. This value must be less than 75 percent.
Processor:
Interrupts/sec
The average number of hardware interrupts that the processor
is receiving and servicing in each second. This value may be
up to 3,500 for 90-megahertz (MHz) Pentium processors, and
more than 7,000 for 200-MHz Pentium processors. Lower
values are preferred.
PhysicalDisk:
% Disk Time
The percentage of elapsed time that the selected disk drive is
busy servicing read or write requests. This value must be as
low as possible.
PhysicalDisk:
Current Disk Queue
Length
The number of requests outstanding on the disk at the time the
performance data is collected. A value of less than 2 is
preferred.
PhysicalDisk:

Avg. Disk
Bytes/Transfer
The average number of bytes that are transferred to or from the
disk during write or read operations. This value must be as
high as possible.
Web Service:
Bytes Total/sec
The total rate of bytes transferred by the Web service. This
value must be as high as possible.
Active Server Pages:
Request Wait Time
The number of milliseconds that the most recent request was
waiting in the queue. This value must be as low as possible.
Active Server Pages:
Requests Queued
The number of requests in the queue that are waiting for
service. A value of 0 is preferred.
Active Server Pages:
Transactions/sec
The number of transactions started per second. This value must
be as high as possible.

14 Module 6: Monitoring and Optimizing a Web Server



 Monitoring and Optimizing Memory Usage
 Monitoring Physical and Paged Memory
 Optimizing Memory Usage


*****************************
ILLEGAL FOR NON-TRAINER USE******************************
The purpose of monitoring memory usage is to determine whether your Web
server has adequate physical memory to run IIS efficiently. Memory shortages
often appear as problems in other components, such as the CPU and peripheral
cards that are dependent on system memory. Therefore, when your Web
server’s response time increases or it cannot handle all of the requests it is
receiving, you must check the available memory first.
Monitoring memory for IIS 5.0 begins with monitoring overall Web server
memory. To monitor memory, you must measure the areas of physical memory
that are used by IIS to ensure that there is enough available memory to contain
the elements that IIS needs to store. The physical memory space must be
sufficient for normal operations and for increases in demand. You must
determine how much of a decrease in performance you will allow, if any, for
these increases in demand.
The Windows 2000 virtual memory system is designed to be self-regulating. To
produce the most efficient use of available physical memory, the virtual
memory system adjusts the size of the file system cache, the working set of
processes, the paged and non-paged memory pools, and the paging files on the
hard disk. Similarly, the IIS 5.0 Web service regulates the size of the IIS Object
Cache, which stores frequently used objects and objects that would slow
performance if they were retrieved repeatedly. Because both the Windows 2000
virtual memory system and the IIS Web service are self-regulating, you do not
need to adjust the size of each memory component, but only monitor memory
usage to ensure that the server has enough physical memory.
Topic Objective
To outline the topics for
monitoring and optimizing
memory usage.
Lead-in

Monitor memory usage to
determine whether your
Web server has adequate
physical memory for IIS to
run efficiently.
Module 6: Monitoring and Optimizing a Web Server 15

Monitoring Physical and Paged Memory

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
The Memory and Process performance objects contain the performance
counters that you can use to monitor physical and paged memory. To ensure
that your Web server has enough physical memory to accommodate IIS 5.0,
you must monitor:
 Available memory. The available memory is the amount of physical memory
available to processes that are running on the computer. Compare the total
physical memory that is available for Windows 2000 with the remaining
available memory when you are running all server services. To gather more
reliable data, log this value over time, including periods of increased
activity. The system attempts to keep the amount of available bytes at 4 MB
or more, but you want to keep at least 5 percent of memory available for
increased activity.
To track available memory, log the server_name\Memory\Available Bytes
counter (where server_name is the name of the computer that you are
monitoring).
 Paging. A page fault occurs when a process requests a page in memory and
the system cannot find it at the requested location. Monitor paging to
determine the number of hard page faults. Continuous high rates of disk
paging indicate a memory shortage.

To track paging, log the following counters: Memory\Page Faults/sec,
Memory\Cache Faults/sec, and Memory\Page Reads/sec.
 File system cache. The file system cache is a reserved area in physical
memory where the file system stores recently used and frequently used data.
By default, the system reserves about 50 percent of physical memory for the
file system cache, but reduces the cache size if it is running out of memory.
To monitor the size of the file system cache, log the following counter:
Memory\ Cache bytes.
Topic Objective
To describe how to monitor
physical and paged
memory.
Lead-in
Use the Memory and
Process performance
objects in System Monitor to
monitor physical and paged
memory.
16 Module 6: Monitoring and Optimizing a Web Server

 Size of the paging files. Paging files are used to store pages of memory used
by the process that are not contained in other files. Paging files are shared
by all processes, and lack of space in paging files can prevent other
processes from allocating memory.
To monitor the paging files, log the server_name\Process\Page File Bytes:
Total counter.
 The size of the paged and non-paged memory pools. The system’s memory
pools hold objects that are created and used by applications and the
operating system.
To monitor the pool space for all processes on the server, log the

server_name\Memory\Pool Paged Bytes and server_name\Memory\Pool
Nonpaged Bytes counters.
To monitor the pool space used directly by IIS 5.0, log the
server_name\Process\Pool Paged Bytes: Inetinfo and
server_name\Process\Pool Nonpaged Bytes: Inetinfo counters.

Module 6: Monitoring and Optimizing a Web Server 17

Optimizing Memory Usage
Improve Data Organization
Improve Data Organization
Implement Disk Mirroring or Striping
Implement Disk Mirroring or Striping
Replace or Convert CGI Applications
Replace or Convert CGI Applications
Enlarge Paging Files
Enlarge Paging Files
Eliminate Unnecessary Features
Eliminate Unnecessary Features

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
The more memory that is available for your Web server, the better it will
perform. IIS 5.0 requires a minimum of 64 MB of memory, but at least 128 MB
is recommended. If you are running memory-intensive applications, your server
may require a larger amount of memory to run optimally. You do not
necessarily need to add RAM to your system to improve performance.
Suggestions for optimizing memory usage without adding memory include:
 Improve data organization.
Keep related Web files on the same logical partitions of a disk to improve

the performance of the file system cache. In addition, defragment your disks
to increase the speed of file access and retrieval.
 Implement disk mirroring or striping.
If pages must be retrieved from disk, use mirroring or striping to make
reading from disk sets faster.
 Replace or convert CGI applications.
CGI applications use more processor time and memory space than
equivalent ASP or ISAPI applications.
Topic Objective
To describe methods for
optimizing memory usage.
Lead-in
There are several ways in
which you can optimize
memory usage without
adding memory to your Web
server.
18 Module 6: Monitoring and Optimizing a Web Server

 Enlarge paging files.
Add paging files and increase the size of existing paging files.
The Windows 2000 operating system creates one paging file on the system
disk, but you can also create a new paging file on each logical partition of
each disk.
 Eliminate unnecessary features.
You can disable the performance boost for applications in the foreground.
Also, when you are not actively checking performance, you can disable
performance-related logging to increase performance on your server.



Under ordinary circumstances, disk activity other than logging activity
indicates performance issues in other areas. For example, if your server requires
additional RAM, you will notice an increase in disk activity due to an increase
in hard page faults.

Note
Module 6: Monitoring and Optimizing a Web Server 19



 Monitoring and Optimizing Processor Activity
 Monitoring and Analyzing Processor Activity
 Enabling Process Throttling
 Monitoring and Analyzing IIS 5.0 Service Connections

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
When one or more processes use a large percentage of the processor time, other
processes are forced to wait in a queue for processor time, resulting in reduced
performance. In this case, adding hardware, such as memory, disks, or network
connections, will not improve performance. To improve performance, you must
optimize processor activity.
IIS 5.0 scales effectively across up to four processors. Consider the business
needs of your Web sites to determine if additional processors are required. For
example, if your Web server hosts static content, then two processors are
sufficient. If the server hosts dynamic content, four processors may
significantly enhance performance. However, if the workload on your Web site
is CPU-intensive, multiple processors will not solve performance issues.
Instead, scale the Web site across multiple servers.
To identify potential processor bottlenecks, you must monitor and analyze

processor activity. You can enable process throttling to ensure that processor
time is available to other Web sites or applications. In addition, you can
monitor and analyze IIS 5.0 service connections to your server to determine
how your server responds to different levels of client demand.
Topic Objective
To outline the topics for
monitoring and optimizing
processor activity.
Lead-in
You must optimize
processor activity when one
or more processes use a
large percentage of
processor time.

×