CXO

Setp-by-Step: Monitoring and tuning your IIS Web servers

Learn to use the Performance Monitor, Task Manager, Event Viewer, and Bandwidth Throttling to manage your IIS Web servers.


As an administrator of Internet Information Services (IIS) Web servers, you pride yourself on keeping your IIS systems running at peak condition. You want your visitors to have a great experience when coming to your site and not have to put up with slow loading pages or crawling links. But what do you do when your Web site just can’t handle the load? The information in this article will help you tune your IIS Server to achieve the most optimal performance.

Performance Monitor basics
The first step in tuning your IIS server is to learn the tools that allow you to do so. The primary tool for monitoring your IIS server is the native Windows Performance Monitor. With the Performance Monitor, you can perform the following:
  • Log Performance data
  • Create charts and reports
  • Configure and set alerts
  • Identify bottlenecks

In Windows NT/2000/XP, you can access the Performance Monitor from the Administrative Tools folder. (In Win2K and WinXP, the Performance Monitor icon is simply called Performance.) Because the Performance Monitor is so customizable, you must spend some time getting to know what counters you will need to use to measure specific events on your systems. When adding counters, you are provided with an Explain button that helps sort out what each counter means. In addition, you can specify different colors and widths for each counter you choose, so that you can immediately recognize them when they are graphed.

Tip
You can save the Performance Monitor results to a file for later viewing. I also recommend that for your mission-critical Web servers, you have a dedicated workstation that you use to monitor your Web servers full-time so that you can quickly examine their status at regular intervals and whenever you think there may be a problem.

To add counters to your Performance Monitor:
  1. Open Performance Monitor from the Administrative Tools Folder.
  2. Click the Add button and add the appropriate counters.
  3. Click Close.

Another useful feature of the Performance Monitor is the ability to add alerts. For example, you might specify alerts to warn you if your processor utilization becomes too high or if your memory becomes too low.

To configure an alert:
  1. Open Performance Monitor.
  2. Expand Performance Logs And Alerts.
  3. Right-click on Alert and select New Alert Settings.
  4. Select a Name, add your counters, and select your action.

Now let's see how to use the Performance Monitor to look at the two most important performance metrics: memory and CPU.

Memory tuning
Performance of your IIS Web server can be drastically reduced if you do not have enough memory to handle the load. You want to make sure that you have enough memory on your IIS system so that swapping does not occur. Windows 2000 and IIS will cache memory as long as there is enough installed on the box. Caching is much faster than swapping. To make sure that you have enough memory for IIS, you should monitor the following counters:
  • File Cache Hits
  • File Cache Hits %
  • File Cache Misses
  • File Cache Flushes

By monitoring the successful and failed hits, you can determine whether IIS has to rely on paging as opposed to going to cache. Keep in mind that the IIS file cache can use up to 4 GB of RAM for caching.

CPU utilization
Obviously, it is important to take a look at your CPU utilization. Monitoring counters such as %Processor Time and Total Processor Time will give you a bigger picture of how your CPU is handling the load. You processor should not sustain a level of more than 80 percent for either of these counters. If it does, you need to look at upgrading your processor or adding another processor, if the system allows for it.

Task Manager
Another quick and useful tool for monitoring IIS is the Task Manager (in Win2K and WinXP). You can access the task manager quickly by pressing [Ctrl][Shift][Esc]. With the Task Manager, you can:
  • View CPU and memory usage quickly.
  • Monitor the CPU and memory usage of Inetinfo.exe (the global IIS process).
  • Monitor the Index Server and Certificate Server, if applicable.

Furthermore, you can add columns to the graphs on the Processes tab of the Task Manager by clicking View | Select Columns. A good column to add is the Memory Usage Delta column. This is useful in determining which applications might have a memory leak. I have used this many times when troubleshooting third-party applications. I can’t tell you how often third-party tools request memory and don't release it when they are finished. This counter helps in determining memory leaks, which can definitely degrade the performance of your Web server.

Event Viewer
The Event Viewer can give you a detailed first glimpse of a problem. When identifying problems, look for the following keywords in the source column in the Event Viewer:
  • NNTP Service—NNTPSVC
  • WWW Service—W3SVC
  • FTP Service—MSFTPSVC
  • SMTP Service—SMTPSVC
  • Active Server Pages
  • Microsoft COM+ MSDTC
  • Certificate Services CERTSVC

Bandwidth Throttling
Now that you have a basic grasp of the Windows tools used in troubleshooting your IIS systems, let’s take a look at a helpful tip for tuning the performance of your Web server. In some cases, you might need to enable Bandwidth Throttling.

Many companies in today’s market run more than just IIS on a Web server. It is safe to assume that they could also be running DHCP, an SMTP server, DNS, and/or other related services. Bandwidth Throttling allows other applications to use the available bandwidth. In addition, if you use host headers and run more than one Web site on your IIS server, you can throttle bandwidth based on each Web site. To learn how to enable and configure Bandwidth Throttling, read this Microsoft TechNet article.

After you have gone over the basics, go ahead and take a look at Microsoft’s Web Application Stress Tool, which allows you to simulate multiple machines connecting to a Web site. This tool was created so that an administrator can find and eliminate any problems with an IIS Web site prior to bringing the IIS Web server live on the production network.

Summary
This article has introduced you to the tools and methodology of performance tuning your IIS Web servers. By using these tools and procedures, you can usually determine the best way to increase Web server performance. Remember that tuning your Web server is an ongoing process, and the more familiar you become with the tools required to tune your server, the more efficiently your server will run.

Editor's Picks

Free Newsletters, In your Inbox