Improving performance is a constant challenge for Windows NT systems administrators. In this article, I address three performance problem areas.
Q: I have experimented with Performance Monitor but have never managed to gather useful information. Which Performance Monitor counters do I need to observe to evaluate my Windows NT server's performance?
Performance Monitor has several key objects for evaluating NT performance, such as LogicalDisk, Memory, Network Interface, Server Work Queues, and System. Within each of these objects, you can monitor several important counters, as Table 1, page 186, shows.
Q: My Windows NT server uses system memory to buffer file transfers. My server typically has more than 100MB of available physical memory, and the paging file is about 10 percent utilized. Recently, Performance Monitor showed that available memory was below 4MB. I started a 250MB file copy from the server to my machine. After 10 seconds the available memory dropped to 0MB. What caused this drop? How can I prevent it from recurring?
NT's file system cache is probably the cause. You can use memory tuning to solve this problem. When you set NT's memory strategy for Maximize Throughput for File Sharing, NT favors the working set of the file system cache. When your system is under a heavy load such as a large file transfer, NT uses any available memory for the file system cache until it runs out. Then NT starts using the paging file for the additional memory space required. (For information about the paging file, see Bob Chronister, Tricks & Traps, June 1996.) By itself, NT paging wastes CPU cycles and time moving data between memory and disk. After NT completes the file transfer and the file system cache is no longer in demand, NT reclaims the memory as other processes request memory. NT does not immediately free up the memory, because the last process that used the memory will probably require it again.
If your system regularly uses excessive memory, or if you want to run other applications while large file transfers are occurring, you can change NT's memory strategy, add memory to improve the performance of your paging file, or increase the amount of available memory. The easiest tactic is to set NT's memory strategy to Maximize Throughput for Network Applications. To set this memory strategy, open the Network applet in Control Panel, and select Server under the Services tab. When you set this memory strategy, NT doesn't use the entire file system cache for I/O transactions. In addition, one large file transfer doesn't consume all of NT's available memory. Another solution is to add memory and thus increase your paging file's performance. However, consider the applications that are running on your system before you add memory. NT can run using the server and workstation services alone. Thus, you can disable unnecessary applications and services to free up memory.
Q: I have a data-processing server with dual 400MHz Intel Pentium II processors. The developer wants to use both processors at 100 percent. The processors currently balance at 50 percent each. How can we improve the server's performance without rewriting the application it runs?
Make sure your application isn't waiting for another Windows NT resource to complete its task. If it is, you must obtain a higher CPU utlilization before you can remove the bottleneck.
If your application operates using one thread, you can control the priority and affinity of your process to give more processor time to your application. Priority lets you assign when and for how long tasks receive time from the microprocessor. Affinity lets you limit which CPUs your application can run on or force it to use only certain CPUs. In NT's standard installation, each process has one or more threads of execution. All these threads require CPU time simply to complete NT OS tasks. NT typically schedules these threads across multiple CPUs in a symmetric multiprocessing (SMP) server environment. If your application has only one thread, the second CPU won't provide much of a performance boost, but it will offload some of NT's housekeeping functions and give your application more processor utilization. If your application is multithreaded and designed to take advantage of multiple CPUs, the second CPU will increase performance. To tune your application's priority level, launch Task Manager and select the Processes tab. Right-click the application's name to set the priority of the application's process. Under Set Priority, select High. Monitor for any performance changes. To tune the affinity level, right-click the application's name and select Affinity. Screen 1, page 185, shows Task Manager's affinity manager.
Using Task Manager's affinity manager, clear one of the CPU boxes and limit your application to one CPU. If performance still does not improve, right-click the process again and set the priority to Realtime. This setting ensures that your application has enough CPU time and improves the chance of a cache hit. I don't recommend using the Realtime priority level on a single-CPU system because your application could deplete the CPU and make NT unstable. As with any advanced tuning techniques, you must use them correctly to avoid NT server lockups.