About Performance Tuning

To provide a satisfactory experience for users, you must make sure that server performance is optimal. Hardware needs vary depending on the service provided. For example, the FTP service uses less memory than the Web service. In addition, Active Server Pages (ASP) applications, Common Gateway Interface (CGI) scripts, database queries, and video files are more processor-intensive than static HTML pages. Performance also changes over time as traffic and site content change. To efficiently tune performance, the server administrator must plan a monitoring strategy using a variety of tools.

This topic includes the following sections:

The Cyclical Nature of Testing and Tuning

Performance testing and tuning is an ongoing process. To test and tune effectively, you must begin by planning your evaluation strategy. The first step is to measure the current level of performance. Because performance of the server can vary greatly over time, be sure to monitor long enough to capture a true picture of activity on the server.

To improve server performance, examine all parts of the system for potential bottlenecks. Bottlenecks can be caused by inadequate or improperly configured hardware, or by software settings in either IIS or Windows 2000. A good monitoring plan checks on performance in all areas.

Once you know how your server is performing, you can begin to make changes aimed at improving performance. Changes should be made one change at a time, or it becomes difficult to assess the impact of individual changes.

After each change is made, continue to monitor to see if the change had the desired effect, or if it had undesirable side effects. Because changes to one resource can cause bottlenecks to appear in other areas, it is important to check on the performance of all resources after you make a change. Once you have assessed the impact of a change, you can determine whether further changes are necessary.

Tools Used to Monitor Performance

Monitoring the server is a crucial part of server administration. By using appropriate monitoring tools, you can detect server problems, evaluate the result of changes to your Web site content, and plan upgrades to make your sites more accessible to users.

The best choice of monitoring tool and method depends on the information you need. For example, if you are trying to measure the overall load on your Web server, you can use System Monitor to render a week-long plot, showing information such as the number of computer connections and file transfers. As another example, if you notice a slowdown in your server's performance, you can check for errors in Event Viewer, the tool for viewing logs generated by Windows 2000.

You can also monitor your server by examining logs generated by IIS. These logs extend beyond those generated by Windows 2000. For information about logging, see the topics listed in Logging Site Activity.

In addition to the tools built into Windows 2000, you can use other performance monitoring tools. For more information, see Performance and Scalability Testing.

The following monitoring tools, available in Windows 2000, can provide both moment-to-moment and summary information:

System Monitor

System Monitor is a powerful tool that you can use to monitor your server’s activity and summarize its performance at selected intervals. With this tool, you can display performance data in real time charts or reports, collect data in files, and generate alerts that warn you when critical events occur. System Monitor examines the output of counters that monitor the activity of specific objects, that is, specific services or mechanisms controlling server resources. For example, if you view the object called Web Service, you can see counters that monitor bytes received per second or connection attempts per second.

Windows 2000 includes a number of counters, and you can supplement these with counters for disk usage and TCP activity by using utilities available in the Windows 2000 Resource Kits (for information, see the resource kit documentation). In addition, IIS installs special counters, including Web service counters, FTP service counters, counters for Active Server Pages applications, and global counters for Internet Information Services. The Web and FTP service counters and Active Server Pages application counters monitor connection activity, while the Internet Information Services Global counters monitor things such as bandwidth usage and caching activity for all IIS services.

System Monitor is designed to provide both short-term and long-term information about the load on your server and sites. The following table lists System Monitor counters that are useful for monitoring your server, and provides ideal values for each one. The computer name, which precedes each object and counter, has been omitted because of space limitations.

Object\CounterIdeal Value
Memory\Pages/sec0–20 (if over 80, indicates trouble).
Memory\Available BytesAt least 4 MB.
Memory\Committed BytesNot more than about 75 percent of physical memory size.
Memory\Pool Nongpaged BytesSteady (slow rise may indicate a memory leak).
Processor\% Processor TimeLess than 75 percent.
Processor\Interrupts/secDepends on processor. Up to 1,000 for 486/66 processors; 3,500 for P90; more than 7,000 for P200. Lower is better.
Processor\System Processor Queue LengthLess than 2.
Disk (Logical or Physical)\% Disk TimeAs low as possible.
Disk (Logical or Physical)\Queue LengthLess than 2.
Disk (Logical or Physical)\Avg Disk Bytes/TransferAs high as possible.
Internet Information Services Global\Cache Hits %As high as possible.
Web Service\Bytes Total/secAs high as possible.
Active Server Pages\Request Wait TimeAs low as possible.
Active Server Pages\Requests QueuedZero.
Active Server Pages\Transactions/secAs high as possible.

For more detailed information about using System Monitor, see the Windows 2000 documentation. For a list of counters provided by IIS, see Counters Reference.

Event Viewer

Windows 2000 includes an event-logging service, which records events such as errors or the successful starting of a service. These event logs are viewed by using Event Viewer. You can use Event Viewer to monitor System, Security, and Application event logs. With this information you can better understand the sequence and types of events that led up to a particular performance problem. For details about how to use Event Viewer, see the Windows 2000 documentation.

Task Manager

Task Manager can be used to view ongoing tasks and threads. It can also be used to change the assigned priority of processes. However, once the process has completed, the new priority setting is lost. CPU and memory usage can be seen in real time, but information is not saved over time. For more detailed information about using Task Manager, see the Windows 2000 documentation.

Network Monitor

Network Monitor captures information on traffic to and from a computer, and gives detailed information about the frames being sent and received. This tool can help you analyze complex patterns of network traffic. By using it, you can view the header information included in HTTP and FTP requests to your server. Generally, you need to design a capture filter, which functions like a database query and singles out a subset of the frames being transmitted. You can also use a capture trigger that responds to events on your network by initiating an action, such as starting an executable file. For details about Network Monitor, see the Windows 2000 documentation, including the Windows 2000 Resource Kits.

Disk Optimization

Hard-disk bottlenecks are most often seen on sites with very large file sets that are accessed randomly. How often IIS needs to access the hard disk is directly related to the amount of RAM and the number and size of requested files. If the amount of RAM is small and either a large number of different files are being requested, or the size of the requested files is large, IIS is unable to maintain copies of the files in RAM for faster access. In this case, IIS must access the files from the hard disk. The access speed and size of the hard disk determine how quickly IIS can locate a requested file.

To monitor your disk drives, use System Monitor to log the percentage of CPU utilized, network card saturation, and the % Disk Time counter of the Physical Disk object. If the % Disk Time counter is high, but the CPU and network card are not saturated, then the disk drive is creating a bottleneck. For more information on Physical Disk % Disk Time, see the Windows 2000 documentation.

To improve disk access, use a redundant array of independent drives (RAID) and striped disk sets. If your server is used heavily for database work, you may need either gigabytes of RAM, so you can minimize access delays, or a drive controller with a large RAM cache. You should also maintain redundancy, so that you are not forced to restore from backup copies when a single drive ceases to function. Many newer controllers permit "hot swapping," so that when a drive fails, it can be replaced without forcing server downtime. Even so, it's a good idea to maintain proper backups, and to keep one copy off-site.


© 1997-1999 Microsoft Corporation. All rights reserved.