Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

September 01, 1997 12:00 AM

Set Sail For Uncharted NT Performance

Windows IT Pro
InstantDoc ID #478
Rating: (0)
Dig into a pirate's treasure of Registry gems to maximize system performance

I guess you can say that I've always questioned authority. When I hear, "Don't do that," my usual response is, "Why? What would happen if I did ?" Although my questioning nature sometimes frustrated my teachers (and perhaps contributed to a few gray hairs), such rebelliousness has its virtues. Questioning authority--in this case, Microsoft--has helped me discover new levels of system performance for Windows NT.

Mutiny on the MS Bounty
I never heeded Microsoft's decree that NT is a completely self-optimizing operating system, one that users don't need to tweak to achieve maximum performance. "Just add more expensive hardware," said Microsoft, "and the promised land of faster performance will be yours." Bah! I knew there must be ways to improve NT's performance with my existing equipment. Remembering the significant performance increases I achieved by tweaking other Microsoft operating systems, I doubted that Microsoft's developers made NT so different that they removed every possibility for the user to enhance performance. I realized that I could no longer be a mild-mannered, obedient NT user; this job clearly required a Registry pirate. With this mindset, I donned my eye patch and sword (and Registry editor), and set sail for uncharted NT performance. In this article (and in future articles), I'll log the results of my expeditions.

Pirate's Rule #1:
Default Settings Equal Milquetoast Performance

The first thing any good NT performance pirate needs to know is that default settings are usually not ideal. The good news about default settings is that they work for most users. The bad news is that they don't give everyone the best performance for a particular situation or application. After all, how can a system be truly self-optimizing if it doesn't know how you're using it? Are your applications disk bound, compute bound, or both? Does the amount of physical RAM you have far exceed your typical working set (the amount of memory a process uses or allocates), or are you running close to the edge? Do you want the highest priority to go to foreground or background tasks, or do you want execution spread evenly among all tasks? The answers to these questions significantly affect NT's performance. Furthermore, if you haven't explicitly told NT how you want the system conFigured, NT is automatically answering these questions for you. If you're like me, you'll want more involvement in the decision-making process.

Pirate's Rule #2:
The Best Buried Treasure Is in the Registry

Several Registry modifications play an important role in optimizing NT. After you understand these buried gems, you can significantly alter your system's performance. Some changes can substantially boost your system's overall speed, but inappropriate changes can decrease performance. Therefore, as I discuss each Registry modification, I'll provide enough information to help you make intelligent decisions about each change and determine which changes are appropriate for your situation. You need to be proficient in using NT's Registry editors (REGEDT32.EXE and REGEDIT.EXE) and always be prepared for disaster, which leads us to Pirate's Rule #3.

Pirate's Rule #3:
Smart Pirates Make Backups

Any modification to the system Registry, no matter how well documented or well intentioned, always involves a certain degree of risk. Any of the Registry modifications I discuss in this article can potentially damage your NT installation or make it unbootable. Therefore, you need a full system backup and an updated copy of the Emergency Repair Disk (use RDISK /S so that you get the SAM and SECURITY Registry hives in addition to the usual information that the RDISK utility backs up) before you make any changes to the Registry. I recommend that you make an additional copy of the Registry using the REGBACK.EXE utility from the Microsoft Windows NT Workstation Resource Kit or Microsoft Windows NT Server Resource Kit CD-ROMs. If your boot partition is a FAT volume accessible via an MS-DOS boot disk and the Registry becomes corrupt or damaged, you can replace the damaged version in the %SYSTEMROOT%\SYSTEM32\CONFIG folder with the uncompressed copy.

You can also restore a damaged Registry by using the option to "Press spacebar now to invoke Hardware Profile/Last Known Good menu" during NT's boot process, or by using NT Setup's option to "Repair a damaged Windows NT installation" (which uses the information stored on the Emergency Repair Disk to restore the system Registry). However, the ultimate method of performing Registry backups and restores is to use a utility designed specifically for that purpose, such as the ConfigSafe NT utility from imagine LAN. This handy utility lets you make multiple backups of your system Registry and dynamically restore your choice of versions if a problem occurs. One final utility toolkit to consider is the set of NT tools available at the NT Internals Web site (http://www.ntinternals.com and http://www.winternals.com). The NTRecover utility is handy for doing dead-system recovery when your system won't boot at all; another handy utility is NTFrob, which gives you an amazing level of control over just about every aspect of NT's file cache.

Pirate's Rule #4:
The Proof Is in the Benchmark

One final rule to keep in mind: Do not conclude that a change is effective or worthwhile until you've proved it with a benchmark. To determine the effect of a particular change, use a benchmarking utility to gain both before and after pictures of system performance. Also, remember to make only one change at a time; then, reboot the system and test. Otherwise, you won't be able to pinpoint the source of a performance improvement or degradation. I recommend two complementary benchmarking utilities that serve different purposes. U Software's Bench32 is a very effective NT and Windows 95 utility that measures CPU, memory, disk, and video performance and compares them to a baseline system. BAPCo's SYSmark for Windows NT 4.0 is a real-world application benchmark utility. Rather than measuring raw throughput for I/O subsystems, this utility measures the performance of several business applications, such as Microsoft's Word, Excel, and PowerPoint. (For more information about these two benchmark utilities, visit the U Software and BAPCo Web sites.)

First Stop: The Paging File
Let's begin our voyage by examining one of the most important contributing factors to an NT system's overall performance: the disk subsystem. NT heavily uses the paging file to swap program code and data from memory to disk and back. NT's use of the paging file is significant even on systems with large amounts of installed memory. Don't fall into the trap of believing that just because your system has lots of available RAM, the paging file goes unused. It doesn't. Although use of the paging file will certainly decrease, NT will continue to use the paging file to swap system code, user code, and data between memory and disk. Therefore, how well NT performs paging on a system is extremely important. Even systems with fast CPUs and lots of memory will suffer from a non-optimized paging file.

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

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

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