Windows IT Pro
Windows IT Library
  - Advertise        
Windows IT Pro Logo

  Home  |   Books  |   Chapters  |   Topics  |   Authors  |   Book Reviews  |   Whitepapers  |   About Us  |   Contact Us  |   ITTV  |   IT Jobs

search for  on    power search   help
 






Optimizing Your Windows NT Network
View the book table of contents
Author: Beth Sheresh
Doug Sheresh
Robert Cowart
Published: April 1999
Copyright: 1999
Publisher: IDG Books
 


You can use Performance Monitor to determine if your paging file is large enough. Monitor the Paging File object’s % Usage Peak counter. If it nears 100 percent under a typical load, increase the size of the file.

Avoiding Paging File Growth
Whenever NT has to extend the size of a paging file, time is lost. If you set the paging file size large enough, you can avoid automatic paging file growth. Examine the Memory object’s Commit Limit and Committed Bytes. Whenever the Committed Bytes value exceeds Commit Limit, NT has to grow the paging file. Consider monitoring Committed Bytes over a period of time to determine its peak value. Then, set the total paging file size to that maximum amount plus 10 percent, for good measure.

If you have multiple hard disks, more options are available to you. If you have more than one paging file, you can determine if your overall paging file size is appropriate. Monitor the % Usage Peak of the _Total instance of the Paging File object in Performance Monitor. Just as in the single paging file case, if it nears 100 percent, it’s time to increase the overall paging file size on your computer.

Splitting up the overall paging file space into multiple PAGEFILE.SYS files on different drives can improve performance. However, the success of this technique is highly dependent on your disk hardware. For example, placing paging files on two IDE drives that share a disk controller does nothing to improve performance and can sometimes degrade it because the two IDE drives can’t be accessed simultaneously.

Simultaneous access to the disks is the key to better performance using multiple paging files. Therefore, modern SCSI adapters and drives are your best bet. Even so, if two drives differ in speed, you may see better performance by placing one paging file on the faster drive instead of splitting it across two drives.

Caution: Never split paging files across multiple volumes on the same disk drive. Doing this will almost certainly degrade performance (and increase drive wear and tear) as the disk head travels back and forth between the two volumes. NT won’t stop you from doing this, but don’t be tempted.

Use the System application in Control Panel to change the number and size of your paging files.

Cross-Reference: See the section called “Managing Virtual Memory” in Chapter 8 for details.

Deciding on NTFS Compression
As mentioned in earlier chapters, NTFS supports folder and file compression to save disk space. As with any compression scheme, there’s a trade-off between file size and speed of compression and decompression. The designers of NTFS compression opted for speed over reduced file size.

Having said that, there is, in fact, a performance penalty for compression. Every time that a compressed file is written and closed, NTFS must compress it before it’s written to disk. Whenever a compressed file is read, NTFS has to decompress it before presenting it to the application. The additional time required to perform these operations is offset somewhat because smaller and fewer disk I/O operations are required to transmit the data between disk and memory.

In an NT Workstation environment, NTFS compression doesn’t seem to introduce significant overhead. However, when used on an NT Server computer, the impact varies dramatically, depending on the traffic pattern of the server. For servers that primarily provide access to files but have few or infrequent updates to them (that is, data is primarily read from the server), the impact of NTFS compression is small. Servers that have much read and write activity, however, show significant performance degradation when the accessed files are stored in compressed form on NTFS.

My bottom-line advice on NTFS compression is to avoid it on frequently accessed files on production servers. For example, don’t compress databases, shared documents, application executable files that are run over the network, and so on. Compression is fine for saving disk space on files and folders that aren’t accessed frequently. Even though disk space is getting cheaper these days, every little bit helps. Just use compression judiciously and avoid creating a performance problem on your servers.

Caution: Never compress the files in your system partition’s root directory (including paging files) or the executable files in SystemRoot where you installed Windows NT Server. You can render your computer unbootable at worst, and slower at best. It’s certainly OK to selectively compress bitmaps and other nonexecutable files within the SystemRoot tree.

Compression is treated as an attribute of files and folders on NTFS, just as the read-only, archive, and system attributes. You can use NT Explorer to control the compression attribute, by bringing up the Properties dialog box associated with a file or folder, clicking the General tab, and clicking to select or clear the Compress checkbox.

Tip: Once you start using NT Explorer to compress files and folders on your NTFS volumes, it’s cumbersome to dig into the object’s properties to determine whether it’s compressed. Instead, on the NT Explorer View menu, click Options, then click the View tab. Click to select the Display compressed files and folders with alternate color check box and click OK. That way, you’ll be able to tell at a glance which objects are compressed. Compressed objects are displayed in blue, so don’t set your background or text color to blue.

If you attempt to compress a folder, Explorer asks you whether you want to compress just the files in the folder or its subfolders also. If you opt not to compress subfolders, the subfolders and their contents will retain whatever compression attributes they had before.

If you want to compress, decompress, or view compression status from a Command Prompt, you can use the COMPACT command. Unlike Explorer, COMPACT won’t ask you if you want to compress subfolders. It will just do it automatically. Type COMPACT /? for details of its syntax.

Tip: If the system happens to crash while performing a compression or decompression operation, the compress attribute might not match the actual state of the file. You can correct this situation by using the force (/F) option of the COMPACT utility to force the compression or decompression to complete.

When copying or moving compressed and uncompressed files between NTFS folders, here are three basic rules:
  • When you move a file from one folder to another, the moved file retains its original compress attribute, regardless of the destination folder attributes.
  • When you copy a file to a new destination, the new file inherits the compress attribute of the destination directory.
  • When you copy a file to replace an existing file, the new file retains the compress attribute of the file that you replaced.
Since FAT doesn’t support file and folder compression, whenever you copy or move a file from NTFS to FAT, the compress attribute of the file is lost, and the file is automatically decompressed. If you copy or move a FAT file to an NTFS folder, the file inherits the compress attribute of the destination folder. Copy a file from FAT to replace a file on NTFS, and the file will inherit the compress attribute of the NTFS file that you’re replacing.

The rules of behavior of NTFS compressed file moves, copies, and replacements can be a bit confusing, until you get accustomed to them. Table 10-2 presents the compression behavior to expect when using the applications and utilities supplied with Windows NT. Third-party applications may act differently.

Managing Processor Load
Installing a faster CPU or faster motherboard may seem like an obvious choice when attempting to improve server performance. Likewise, adding more processors to a multiprocessor computer sounds like a reasonable way to increase speed. However, even if overall server performance is unacceptable, these relatively expensive upgrades may have little or no effect if the performance bottleneck lies elsewhere. In the following section, I focus on detecting whether a CPU bottleneck exists.

Measuring Processor Load
The key to detecting CPU bottlenecks is to keep track of the Processor object’s % Processor Time counter. This tells you what percentage of time a processor is performing nonidle work. (Processors that are waiting for work aren’t actually idle. During these periods, they spend their time executing an idle thread. The % Processor Time counter doesn’t include this so-called idle time.)

If the percentage of processor time measurement consistently climbs near 100 percent, there are a couple of possibilities. Either the processor is truly a bottleneck, or you have applications on your computer that are so CPU-intensive that they need to be moved to another computer or scheduled during off-hours.

Cross-Reference: I discuss how to schedule tasks for off-hours in Chapter 12.

Resolving Processor Bottlenecks
If you determine that you truly have a processor bottleneck, here are some possible solutions:
  • As mentioned in Chapter 1, don’t run complex screen savers on your server. When they kick in, they can absorb a large percentage of your processor’s time, at the expense of real work. Choose a blank screen saver.
  • If investing in faster hardware isn’t an option, consider spreading the CPU load of multiple server applications across different servers.
  • Consider upgrading the processor to a faster CPU speed. In Chapter 1, I discussed several upgrade alternatives.
  • If the motherboard is running at 33MHz or slower, consider replacing it with a faster one. 66MHz motherboards are standard in Pentium-based servers, at the time of this writing. Even faster motherboards are on the way.
  • If you don’t have an SMP (symmetric multiprocessing) computer, consider investing in one. Make sure that your server applications can take full advantage of the added CPUs.
  • If you have an SMP computer that’s upgradable to additional CPUs, you can opt to add more processors to your computer.
Caution: Before you add more processors to an SMP computer, make sure that all existing processors are being used in your environment. By measuring each Processor object instance individually, you may find that some CPUs are fully loaded, whereas others remain idle. This can happen when you run single CPU-intensive applications that aren’t designed to be multi-threaded. In this situation, adding more processors costs you money and buys you nothing.

Managing Memory Performance
So far, all roads seem to lead to adding more physical memory to your NT Server computer. Adding more memory is always a good thing, since it can also help disk and network throughput. However, before you invest in additional RAM, it’s important to understand whether you already have the right amount.

Monitoring Memory Usage
One of the key indicators of memory performance is the Memory object’s Pages/sec counter. This value tells you how many pages per second are written to or read from disk to satisfy references to pages that aren’t in memory. If the number consistently averages above five pages per second, you probably have a memory bottleneck in your system. If the average is consistently above 10, your disks will grind so wildly that you’ll be lucky to gather the performance results.

Another way to examine memory performance involves monitoring the cache. Watch the Memory object’s Cache Faults/sec counter to determine how frequently the system can’t find data in the cache and must find it on disk. If you see an increasing trend in this counter, it’s a signal that you may be heading for a condition called thrashing, in which almost every access to data requires a disk I/O operation.

Tip: Applications sometimes have bugs called memory leaks, which cause them to consume memory resources and never return them to the system after use. Often, just closing the application and restarting it will free the memory resources.



Page: 1, 2, 3, 4, 5, 6, 7, 8

next page



Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing