Chapter 15. Performance Monitoring and Tuning

Performance monitoring and tuning is the process of tracking system performance to estab lish baselines and to identify and resolve problems. When you install a server, you should cre ate a performance baseline to see how the server is performing given its current resources and typical usage. If a server isn't performing as expected, is unresponsive, or is generating errors, you'll want to try to investigate. Many tools are designed to help you monitor server perfor mance and troubleshoot performance issues. This chapter discusses the key tools for fine tuning the system configuration, tracking system health, and troubleshooting the event logs. In the next chapter, you'll learn more about comprehensive monitoring techniques you can use for establishing performance baselines and pinpointing performance bottlenecks.

Tuning Performance, Memory Usage, and Data Throughput

Out of the box, Microsoft Windows Server 2003 is optimized for general network envi ronments. The operating system might not, however, be optimized for the way a particu lar system is being used in your organization. You can often improve Windows operating system and application performance considerably simply by finetuning the way a system uses resources. While you are finetuning resource usage, you should also take a look at the server's data throughput configuration. Optimizing data throughput options can help ensure the server is configured appropriately to support user requests, file handles, and client connections.

Tuning Windows Operating System Performance

One of the reasons the Windows operating system no longer ships with 3D screen savers is that when these screen savers turn on, they use a considerable amount of processing power to render the 3D art. In some cases, the screen saver alone put the processor at 99 percent utili zation, and you can probably imagine how well servers performed when the processor was maxed out. Similarly, you don't want the Windows operating system to tie up too much pro cessing power displaying visual effects when administrators or other users are logged on to a server. So, if you're wondering why all the fancy visuals are turned off in the standard config uration of Windows Server 2003, this is why—the processing power is better used supporting the server's roles and applications than displaying fancy visuals to users that log on.

In most cases, you want to keep the visual effects to the bare minimum as per the default con figuration after installation. This ensures that users who log on either locally or remotely won't severely impact the performance of the system just by logging on and displaying menus and dialog boxes. You can check or change the visual effects options by using the Perfor mance Options dialog box. Click the Advanced tab in the System utility, and then click the Settings button in the Performance panel to display the Visual Effects tab in the Performance Options dialog box, as shown in the following screen:

image with no caption

Tuning Processor Scheduling and Memory Usage

The way the Windows operating system performs for applications and installed services is determined by the processor-scheduling and memory usage configuration. Processor-scheduling options control how much processor resources are allocated to applications running on a server, which in turn determines the responsiveness of applications. You can optimize processor scheduling for the following application types:

  • Programs When processor scheduling is optimized for programs, the active (fore-ground) application running on the system gets the best response time and the greatest share of available resources. Generally, you'll want to use this option only on develop ment servers.

  • Background services When processor scheduling is optimized for background ser vices, all applications receive equal amounts of processor resources, and the active application doesn't get the best response time. Generally, you'll want to use this option for production servers.

Memory caching controls how much physical memory is reserved for the system cache, which in turn determines the way the system cache is used. You can optimize memory cach ing for the following application types:

  • Programs When memory caching is optimized for programs, the operating system reserves less memory for the system cache and relies on applications to have their own cache. Generally, you'll want to use this option only on development servers, with the exception that you could use this setting on production servers that run services like IIS that can use their own separate cache.

  • System cache When memory caching is optimized for the system cache, the operat ing system reserves more memory for the system cache. Generally, you'll want to use this option for production servers, particularly if installed applications don't maintain their own cache and instead rely on the system cache for their caching needs.

You can check or change processor-scheduling and memory usage configuration by using the Advanced tab of the Performance Options dialog box. Click the Advanced tab in the System utility, and then click the Settings button in the Performance panel to display the Perfor mance Options dialog box. Then select the Advanced tab, as shown in the following screen, in the Performance Options dialog box.

image with no caption

Tuning Data Throughput

Behind the scenes when you optimize the way a server uses system cache, the server makes several assumptions about how it should be configured to handle user requests, file handles, and client connections, collectively referred to as data throughput options. If the server is configured to adjust for best performance of the system cache, the system increases the amount of memory reserved for the system cache and it maximizes data throughput for file sharing. Here, the server dedicates as many resources as possible to handling user requests, file handles, and client connections. This improves responsiveness and can also improve per formance for user, file, and client actions and should be used with Active Directory, file, print, and Network And Communications servers.

If the server is configured to adjust for best performance of programs, the system reduces the amount of memory reserved for the system cache and it maximizes data throughput for net work applications. Here, the server optimizes itself for distributed applications that manage their own memory cache, such as IIS and Microsoft SQL Server. This reduces the size of the system cache because fewer resources are allocated for user requests, file handles, and client connections and should be used with application, Web, and streaming media servers.

In most cases, these data throughput configurations work well. However, if servers have mixed usage, such as a server that provides Active Directory services and application services, you might need to change the data throughput options. Usually this means configuring the server to balance the needs of the mixedusage environment. When the server attempts to balance data throughput, it allocates some additional resources for handling requests, file handles, and client connections, but not as much as when it is configured to maximize data throughput for file sharing.

You might also find that you want the server to reserve as little memory as possible for data throughput. In this minimalmemory configuration, you free up memory for other pur poses, but the server is set to serve a small number of users.

Data throughput is optimized by using File and Printer Sharing for Microsoft Networks. You access this networking component by using the system's Local Area Connections Properties dialog box. Servers with multiple network adapters have multiple network connections, and you should optimize each of the related local area network connections as appropriate.

To get started, access Network Connections in Control Panel. Rightclick Local Area Connec tion, and then select Properties. This displays the Properties dialog box. In this dialog box, doubleclick File And Printer Sharing For Microsoft Networks to display the File And Printer Sharing For Microsoft Networks dialog box, as shown in the following screen. In the Server Optimization tab, select the appropriate optimization setting, and then click OK. You must reboot the server for these changes to take effect.

image with no caption

Tuning Virtual Memory

Windows Server 2003 uses virtual memory to allow a system to page parts of memory to disk. This makes it possible for a system to create a paging file on disk and use more memory space than is physically available. All servers have an initial paging file. It is created automatically on the drive containing the operating system during installation and setup.

In some cases, you can improve a server's performance by optimizing the way the paging file is used. You can configure the size of the paging file so that it is optimal given the server's RAM and usage. Although Windows Server 2003 can expand paging files incrementally as needed, you'll want to size the paging file so that it is as large as it needs to be for average usage conditions. This helps reduce fragmentation of data within the paging file and also keeps the server from having to expand the paging file continually.

You can also fix the paging file size so that the server needn't spend any resources expanding the paging file. If you do this, I recommend setting the total paging file size so that it's twice the physical RAM size on the system (the default paging file size is 1.5 times RAM). For instance, on a server with 512 MB of RAM, you could configure the paging file to use 1024 MB. This is a general rule of thumb, however, and not an absolute. On servers with 2 gigabytes (GB) or more of RAM, it's best to follow the hardware manufacturer's guidelines for setting the paging file size.

If a server has multiple hard disk drives, you might consider creating a paging file for each physical hard disk drive on the system. Multiple paging files can incrementally improve the performance of virtual memory on SMP machines with eight or more processors and a large amount of RAM. When you use multiple paging files, you create several smaller paging files rather than one big one. For example, if the paging file should be set to 1024 MB of RAM and the system has two disk drives, you could configure both drives to use a paging file 512 MB in size.

You can manage the paging file configuration by using the Virtual Memory dialog box. Click the Advanced tab in the System utility, and then click the Settings button in the Performance panel to display the Performance Options dialog box. Then select the Advanced tab in the Performance Options dialog box, and click Change in the Virtual Memory panel, as shown in the following screen.

image with no caption

The upper section of the Virtual Memory dialog box shows the current paging file location and size. The initial paging file size is shown followed by a dash, and then the maximum size is shown. If the paging file has a size that can be incremented, the initial and maximum sizes will be different, such as 768–1536 MB. If the paging file has a fixed size (recommended), the initial and maximum sizes will be the same, such as 1024–1024 MB.

Selecting a disk drive in the top portion of the Virtual Memory dialog box allows you to con figure whether and how the paging file is used. Usually, you want to select Custom Size and then set the Initial Size and Maximum Size options. Then click Set to apply the changes before you configure another disk drive. When you are finished configuring paging file usage, click OK. You then will be prompted to restart the server for the changes to take effect. Click OK. When you close the System utility, you will be prompted to restart the system for the changes to take effect. Click Yes to restart the computer now, or click No if you plan to restart the server later.

Caution

Don't set the total paging file size to 0 MB. As you set the paging file for individ ual drives, pay particular attention to the Total Paging File Size For All Drives information. You don't want to configure a server so that the Currently Allocated value is 0 MB. This means no paging file is configured, and it will drastically reduce the server's performance.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset