Subscribe to Windows IT Pro
September 01, 1997 12:00 AM

Set Sail For Uncharted NT Performance

Windows IT Pro
InstantDoc ID #478
Rating: (0)

On NT systems with insufficient amounts of free physical memory, setting LargeSystemCache to a non-zero value usually increases paging file activity because memory usage is prioritized in favor of the system cache rather than system processes. If applications need additional memory, the extra memory usually comes from the paging file. The resulting increase in paging file activity typically reduces overall system performance.

Turbocharging NTFS
If you're using NTFS on your system, several changes can help you increase the file system's speed. The first and most basic setting is one that NTFS chooses automatically when you format a new NTFS partition: the volume's cluster size (NTFS allocates disk storage in units known as clusters). Typically, NTFS selects the volume's cluster size (measured in bytes) from a list of defaults that relate to the volume's total capacity. Table 2 lists the default cluster sizes for ranges of volume size.

Usually, the default cluster size provides good performance; however, reformatting the volume with a different cluster size can enhance performance in some environments. Unfortunately, to change cluster size, you must back up the entire volume to tape (or to another volume), reformat the volume with the new cluster size, and then restore the data. You can use NT's Disk Administrator utility, as shown in Screen 2, or use the FORMAT command from the NT command prompt to specify the cluster size when you format NTFS volumes. The syntax for the FORMAT command is

FORMAT <drive>: /FS:NTFS /A:<size>

where drive is the drive letter of the drive to format, and size is the cluster size to use on the new volume (512, 1024, 2048, 4096, 8192, 16K, 32K, or 64K). This setting overrides the default cluster size. (At cluster sizes above 4096, NTFS does not support some features, such as NTFS compression and virus checking.) A third method for specifying cluster size is to double-click My Computer on the desktop, right-click the volume, and select Format. When the Format dialog box appears, simply change Allocation Unit Size to a value from the drop-down list.

Changing a volume's cluster size may be appropriate depending on the type of files on the volume. For example, a volume with a large number of small files may perform better with a small cluster size, whereas a volume with a few very large files may perform better with a large cluster size. Be sure to benchmark each cluster size scenario with lengthy file I/O operations, using files of different sizes if possible (Bench32 lets you test disks with files from 1MB to 20MB in size). If you experiment with different cluster sizes, start small: Move up or down one cluster size at a time and then retest. Once you find the cluster size that yields the best performance for the average file size to be stored on the volume, you can restore the data to the volume.

NTFS is a sophisticated file system, and features such as the extended attributes that NTFS files use to support NT permissions increase overhead to your system. Certain default NTFS behaviors can unnecessarily reduce your system's performance. One such behavior is the automatic generation of 8.3 DOS-style filenames for all files stored on NTFS volumes. Because NTFS must generate an 8.3-style name for each new file created on the volume, write operations with such names take longer than write operations that use only long filenames. If your network doesn't include any DOS or Windows 3.x clients, you can disable this automatic feature. In the Registry, change the value of NtfsDisable8dot3NameCreation to 1 in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.

Several points are important to keep in mind about this procedure. First, be sure that your network does not now contain (and will not contain in the future) any systems that use DOS, Windows 3.x, or Windows for Workgroups 3.x. These systems cannot use NTFS files without 8.3-style names. Second, be aware that changing this Registry value affects only future files stored on the volume. Existing files retain their 8.3 version names until you remove the files from the volume. If you want to start with a clean slate, set the Registry value to 1, move all the files to another volume or tape, and then move them back to the original volume.

As long as we're in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem, I'll point out another file system-related setting that can improve NTFS performance. The NtfsDisableLastAccessUpdate entry controls whether NTFS updates the LastAccess time/date stamp on directories as NTFS traverses the directory structure. Disabling updates can also reduce NTFS overhead, without significantly impairing functionality. The default value is 0 (NTFS updates directory time/date stamps); change the value to 1 to disable updates. If you don't see the NtfsDisableLastAccessUpdate entry, you can manually add it as a REG_DWORD type with value 1. However, if you add this entry, be very careful to spell the name correctly, including capitalization.

Here's one last item on disk performance optimization: Whenever possible, keep the amount of free space on a physical disk at 40 percent or more. When the amount of free space drops below 40 percent, the disk takes significantly more time to find free space to write data. Although you can mitigate this effect by regularly using a disk defragmentation tool (e.g., Executive Software's Diskeeper or Symantec's SpeedDisk utility in Norton Utilities for Windows NT), you'll still experience a significant performance hit on a crowded disk.

X Marks the Spot
As with all system-tuning modifications, I highly recommend that you first try the modifications I've described in this article on non-production machines before you change your network servers and workstations. Occasionally, you may find hidden ramifications that affect particular applications. By testing the modifications first, you reduce the possibility of any unpleasant surprises. Finally, remember to benchmark system performance before and after each system modification so that you can quantify the performance effects of each change. You might also want to consider doing each benchmark twice or (even better) doing the tests on two different systems. This tactic gives you a more objective test and helps reduce the possibility that some software or hardware peculiarity will interfere with the accuracy of your tests.

Contact Info
ConfigSafe NT
imagine LAN * 800-372-9776
Web: http://www.imagine-lan.com/
Email: sales@imagelan.com
Bench32
U Software
Web: http://www.usoftware.com
Email: usoft@usoftware.com
SYSmark for Windows NT 4.0
BAPCo * 408-988-7654 or 800-321-0457
Web: http://www.bapco.com
Email: cramco@interpath.com

Related Content:

ARTICLE TOOLS

Comments
  • Susan Snedaker
    13 years ago
    Aug 13, 1999

    I enjoyed Sean Daily’s September article. However, I’d like to add a couple of comments. Mr. Daily’s article was unclear on two points.

    First, he recommends spreading the paging file across a stripe set. Although this method will generally increase performance, you do not want to put the paging file across a stripe set with parity. There is no reason to use parity for a paging file, and doing so will significantly reduce performance during write operations.

    Second, the memory configurations Mr. Daily discusses leads him right back to, “In most cases, you’ll find that the Balance settings give the best overall performance.” Mr. Daily points out what’s underneath the user interface (Registry keys, LargeSystemCache) but doesn’t mention some simple guidelines for optimizing memory settings in NT.

    Each setting corresponds to specific uses. If you have fewer than 10 users, you’ll find that the Minimize Memory Used setting will increase throughput. If you’ve got a larger number of users, the Balance setting works best. If you are using the server to host an application (such as an Access database) that requires a lot of file sharing, your performance will improve if you use Maximize Throughput for File Sharing. Finally, if you’re using the NT server as a SQL server or other BackOffice-type application (client/server), you’ll want to optimize performance by using Maximize Throughput for Network Applications.

    By default, NT servers are configured to give preference to the file system cache over the working sets of processes. However, occasionally you will want to change to Maximize Throughput for Network Applications, because you will encounter processing delays from writing pageable code to disk (e.g., when using IIS). I look forward to future articles on performance tuning.

    --Susan Snedaker

    Thanks for your letter. Your clarifications are on the money—I agree that you should never spread paging files across stripe sets with parity (RAID 5) volumes. This action actually degrades performance because of parity overhead and the lower write performance of RAID 5 volumes.

    I also agree that I need to clarify the functions and intended uses for each of the Server service configuration options. Microsoft intended each of these options for a particular situation based on the number of users and intended role of the server. Although the focus of my article was to inform readers of what goes on behind the scenes (in the Registry), understanding the basics is important.

    I also have a clarification to your comment about the
    Maximize Throughput for Network Applications setting. Although you state that this setting is best for SQL Server, this recommendation is not always correct. SQL Server performs its own internal memory management (rather than relying on NT’s management scheme), and as a result doesn’t always work best with this setting. Often, the Balance or Maximize Throughput for File Sharing options will yield equal if not better performance on SQL Server systems. In any case, it’s always a good idea to do liberal benchmarking to decide which is best in a particular situation.

    --Sean Daily

  • Ted Harris
    13 years ago
    Aug 13, 1999

    Thank you for Sean Daily’s September article, “Set Sail for Uncharted NT Performance.” Basically, I run one program, AutoCAD, with an occasional trip to a word processor for long text notes to import into AutoCAD.
    I learned a long time ago (version 1.1) that if you properly set up and configure AutoCAD, it is virtually failsafe, not prone to the dreaded fatal error. However, few people would listen to me or even bother to look at the installation manual. Now, AutoCAD comes without all the manuals—you must buy them. Thank you for this article!

    --Ted Harris

  • Bryan Keadle
    13 years ago
    Aug 10, 1999

    After reading Sean Daily’s September 1997 article, “Set Sail for Uncharted NT Performance,” I have a couple of questions: First, why does shutting down NT take so long? Can I speed up the startup/shutdown process, other than by disabling services? Second, I get a strange delay of about 10 to 15 seconds at the command prompt when I run most anything (e.g., EDIT). After executing a program once, the next time I run that program it pops up right away as I would expect. Obviously some caching is happening. I don’t understand why these various DOS-based programs take so long to execute initially.

    —Bryan Keadle



    NT 4.0 seems to take a lot longer than NT 3.51 to shut down, especially on NT server computers. Although you can’t do much to speed the startup process other than disabling services or obtaining faster hardware, you can do things to reduce the length of time the shutdown process takes.
    The Server and Spooler services commonly cause the exaggerated shutdown delays. To speed up the shutdown procedure significantly, you can shut down these services manually (e.g., via the Services Control Panel or via the NET STOP command line method) before executing the Shutdown process. Other potential candidates for manual pre-shutdown include Windows Internet Naming Service (WINS), Dynamic Host Configuration Protocol (DHCP), Internet Information Server (IIS–all services), and Domain Name System (DNS).
    I’ve seen the process take one-fourth as long as it takes if you stop no services ahead of time. With the command-line method and placing the respective NET STOP commands into a batch file, you can consolidate this process into one command (or icon) that you can execute before issuing the shutdown command. For example, you can enter the following lines:




    NET STOP “Spooler”

    NET STOP “Server” /Y



    (The /Y switch is necessary because the system will prompt you if dependent services also need to be shut down before the Server service. When you issue /Y, the dependent-
    service shutdowns will automatically occur.)
    Microsoft Exchange Server (any version) also slows the NT Server shutdown process. To significantly reduce the shutdown time of an Exchange Server, manually shutdown the Exchange-related services before you issue the Shutdown command. Although you can individually select each Exchange service in the Services Control Panel and shut down each, an easier method uses the following two simple lines:




    NET STOP “Microsoft Exchange System Attendant” /Y

    NET STOP “Microsoft Exchange System Attendant” /Y



    The System Attendant service, shutdown with the /Y switch, will automatically shut down all the Exchange-related services. The second line ensures that the System Attendant service shuts down after the other services shut down in the first step. (In Exchange 4.0, the first command doesn’t shut down the System Attendant service, just the other, dependent services). Some Exchange 4.0 installations might require three iterations of the command to stop all Exchange-related services.
    Regarding your second question, I don’t know what’s causing the delay, but I can let you in on a secret that affects the initial execution of 16-bit Windows applications under NT. The first time a 16-bit DOS or Windows application launches, NT starts a special Virtual DOS Machine (VDM—with the executable name ntvdm.exe) that contains the Win16 on Win32 (WOW) subsystem required to provide Win16 application support under NT. Even after all 16-bit Windows applications are closed, NT keeps the VDM and WOW subsystem environment active in memory, and doesn’t remove them until you restart the system or stop the process manually (e.g., via the Processes tab of Task Manager). If you run 16-bit applications under NT and want the first Win16 application to load faster, consider placing a shortcut to wowexec.exe in your Startup group. This method will preload the WOW subsystem and make it instantly available when you later execute your first Win16 application. (It will also waste some system resources if you don’t end up using any Win16 applications.) I discuss these and other Win16 subsystem-related optimizations in “Optimizing NT’s WOW Subsystem,” page 151.

    --Sean Daily

  • Nik Simpson
    13 years ago
    Aug 10, 1999

    In the December 1997 issue, Susan Snedaker wrote concerning Sean Daily’s optimizing NT performance article. Susan says you have no reason to put NT paging files on a RAID protected stripe, and Sean agrees.
    Assuming system uptime is critical, having the paging files on a RAID protected stripe is important. If a drive with the paging file fails, the system will go down instantly. RAID 5 is probably not the performance solution; RAID 1 or a mirrored stripeset is preferable. In a mission critical environment, RAID protection of the paging file is a necessity, not a luxury.

    --Nik Simpson

  • Rus Smith
    13 years ago
    Aug 10, 1999

    After reading Sean Daily’s NT Performance article, I tried to implement regback.exe from the Microsoft Windows NT Server Resource Kit. I continually got an error that said the backup failed and gave an address of 0x00000003. (I have Administrator privileges.) Great article. Keep up the great work.

    --Rus Smith



    I find that REGBACK fails to back up files into the same directory where a previous REGBACK-created backup exists. Be sure that no existing Registry backup exists in the target directory. Get the latest updated version of REGBACK from the Microsoft Windows NT Server 4.0 Resource Kit, Supplement 2. Your problem might stem from an inability of the original version to back up the Registry based on something in your NT environment.

    --Sean Daily

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.