| Microsoft NT Server - Performance Tips and Tricks |
|
| Written by Babul A. Mukherjee | |||||||||||||||||
|
Microsoft NT Server - Performance Tips and Tricks Written by: This e-mail address is being protected from spambots. You need JavaScript enabled to view it Last updated: 05/28/00 I have collected these tips on optimally configuring NT Server since August 1997. The tips come from a variety of sources including books, magazines, newsgroups, web sites, and personal experience. Almost every tip included, unless specifically noted, has been tested and provided a proven improvement to our servers and our client's servers. Unless otherwise noted, before using any tip mentioned, make sure you are running at least Service Pack 6a with NT4 before proceeding. These tips should also work for NT Workstation. NT Server Enterprise - but may have not been specifically tested. Windows 2000 is quite an upgade to NT4 and most of these tips are only for NT4. Do not apply the registry fixes to Windows 2000 unless you're preparing/understand the consequences. By and large, the registry tweaks for performance/memory are not necessary for Windows 2000. As they say, measure twice, cut once... NT does not provide a defragment utility like Windows 95 does. Microsoft used to say that fragmentation is not a problem on an NTFS drive. They do not say that anymore because it IS NOT TRUE. Any NT drive that has had more than one application loaded on it is fragmented. Every file access beyond the initial install causes fragmentation. From my experience, a basic server takes a fragmentation performance hit the SECOND DAY IT IS RUNNING. I am not kidding. Fragmentation is like a cold, the longer you wait to do something about it, the harder it is to get rid of. We use and recommend Executive Software's Diskeeper 3.0 Server/Workstation. It works very well, and will run in the background insuring the server's drives are kept at their optimal performance. If you are attempting to defragment a server that is heavily fragmented, DO NOT rely on the background defragmenter to resolve your fragmentation problem - it won't happen. In order to resolve the initial fragmentation problem, you will NEED to manually run Diskeeper repeatedly until your fragmentation level drops to a low level (if not completely eliminated). In order to successfully defragment a drive, you should insure that at least 20% of the drive's space is free. If not, you will need to manually run the defragmentation many times initially - with a slimmer chance of a completely fragment-free drive. I've had to in the past move files off of the drive temporarily just to bring the fragementation in line. If you have more than 256KB of L2 cache, Windows NT may not be using all of it. We've only found this tip needed for older dual-processor Pentium motherboards (Tyan Tomcat III or IV). Anything newer (Pentium II or better), Windows NT seems to determine the L2 cache amount just fine.
On the right side of the window you will find SecondLevelDataCache. This defaults to 0, which is the correct value for 256KB of L2 cache. Double-click SecondLevelDataCache to bring up the DWORD Editor. Click the Decimal radio button, enter the amount of L2 cache you have, then click OK. Exit RegEdt32, and your machine should be a lot faster. If you don't know how much L2 cache you have, you may be able to find out during boot-up. Each brand of BIOS has its own display format, but look for "L2 Cache", "Secondary Cache", or something like that. The value should be 256, 512, or 1024. If your system is fairly I/O intensive, you may benefit from raising the I/O Page Lock Limit, which can increase the effective rate at which data is read from or written to the hard disks. First, benchmark your common tasks. See how long it takes to load and save large files, how long it takes to search a database or run a common program; just do your normal tasks, timing them to record how fast they are. Then follow these steps:
This value is the maximum bytes that can be locked for I/O operations. A value of 0 defaults to 512KB. Raise this value by 512KB increments (simply entering the number "512", "1024", etc.), then exit regedt32 and benchmark your system after each increment. When an increase does not give you a significant performance boost, go back and undo the last increment. Caution: There is a limit to this. I recommend you do not set this value (in bytes) beyond the number of MB of RAM times 128. That is, if you have 16 MB RAM, do not set IoPageLockLimit over 2048 bytes; for 32 MB RAM, do not exceed 4096 bytes, and so on. That's the safe method. You may be adventurous or impatient and want quick results. If so, try this:
If you get little or no improvement, work down by 512 byte decrements till you note a drop in performance, then go back up 512 bytes. If you did see an improvement, continue with step 5.
If you get little or no improvement in the third benchmark, work down in 512 byte decrements. If you do get improvement, work up from maximum. And if the first increase from shows little improvement, work down from . Unless you don't do much I/O, this should give you a significant boost in performance. Tip - What is Using Your Memory? To find out how much memory each application is using, the first thing to do is click Start, then go to Programs, Administrative Tools and Windows NT Diagnostics. Click the Memory tab and look at Physical Memory in the upper right hand section. This tells you how much memory you have and how much is available. Also note the section below this, Kernel Memory; this is what Windows NT itself is using. Then press CTRL-ALT-DEL and click the Task Manager button, then the Processes tab. This lists the existing processes. If it does not have columns titled Mem Usage and VM Size (Virtual Memory), go to the menu bar and click View, then Select Columns and check the boxes for Memory Usage and Virtual Memory Size. Now you can see just how much memory each process is currently using. Add the VM Size value and you have the amount of memory the process actually uses. If the Physical Memory is low (a few thousand or less), you definitely need more RAM. Incidentally, in the same Windows NT Diagnostics window, you will find Pagefile Space. If the Peak Use value is anywhere near the Total value, you should make a larger pagefile, or create another pagefile on another partition; a large single pagefile is generally faster than two small pagefiles. Memory Management: This is the most likely area to need tuning. Most of the value entries are maintained from Control Panel System Virtual Memory, but there are a couple you may tweak manually. Memory Management Value Entries Some of these entries may not appear in your Registry. If so, you can add them, but be sure you spell them EXACTLY as presented here, without changing the case of any character. ClearPageFileAtShutdown: When this is set to a Value Type of REG_DWORD and a value of 1, all data in the paging file will be cleared upon system shutdown. You must reboot for this change to take effect. The paging file will not be cleared on this reboot, but will clear on each subsequent one. DisablePagingExecutive: When set to zero, this allows Windows NT to page the kernel pools to the paging file; set it to one, and the kernel pool will stay in memory. If you have a large amount of unused memory, or if for some reason your paging file is slow, this might be of value. Disabling the Paging Executive may slow your system to a crawl, so if you are going to try changing this, pick a time when your system can be out of production for a while. IoPageLockLimit: This value is the maximum bytes of memory that can be locked for I/O operations. A value of 0 defaults to 512KB. Raising this value can give you a significant performance boost. The procedure is detailed in the article Memory Usage. LargeSystemCache: 0 tells the system to favor the processes working set, non-zero means to favor the system-cache working set. For most systems, your applications will run faster if this value is set to zero; if it is non-zero, your paging file may be over-active (if you have a noisy hard drive, check to see if LargeSystemCache is non-zero). Thus most Workstations should have this set to zero, and most Servers should have it set to one. PagedPoolQuota PagedPoolSize: Also Min, Max, and others, and all of these for NonPagedPool. "Pool" is all of the system memory. "Paged" means it can be paged, or written, to the disk. "NonPaged" means it can't be written to the disk. The values in the Registry are normally zero, which tells Windows NT to calculate default values relative to the amount of RAM on your computer. You should leave these alone because, since changing these values can cause Windows NT to miscalculate other resource allocations, incorrect values can cause Windows NT to malfunction, and possibly even cause file system corruption. A professional who knows what side-effects will occur may benefit from reducing the pool allocations (setting values larger than the defaults will have no effect), but I'm sure that very few people outside Microsoft know enough to safely tinker with this. But if you're interested in the details of the default calculations, see the Microsoft article Q126402. You can find Knowledge Base articles by going to www.microsoft.com, clicking Support in the menu bar, then clicking support online in the first paragraph. Click the radio button "Specific article ID number" then enter the article number. PagingFiles: Data about existing paging files (location and sizes) is stored here. You should use Control Panel / System / Performance to adjust your paging files, but this value can be handy if you get in trouble. For example, if your paging file is smaller than your physical memory or your system partition does not have enough free space to record a crash dump file, then if you get a bug check (the blue screen crash), your system may go into a continuous series of reboots. The Microsoft Knowledge Base article Q174630 details how to handle this. SecondLevelDataCache: This is the amount of L2 cache Windows NT will use. It defaults to 0, which is the correct value for 256KB of L2 cache. If it is set to 0, but you have more than 256KB cache, you should change it.
This will probably give you a noticeable performance increase. Some people have reported no change, some say their performance more than doubled. SystemPages: Here you specify the number of page table entries available. The default is almost always sufficient, but if you install a PCI card with a very large amount of on-board memory (like a very sophisticated video card), and you cannot access all of the card's memory, this is probably where the solution will be. Contact the card's manufacturer for the correct value to enter. Swap file performance will improve if you follow these simple rules of thumb:
One seldom performed optimization is telling NT how to balance memory/network performance. Out of the box, NT Server is set to be optimized as a workstation!! Here's how to fix this:
Most IS shops use the drivers included on their NT CD-ROM when setting up a server. An easy way to make better use of your equipment is to get the latest drivers. This is especially important for network interface cards and SCSI/IDE adapters. Manufacturers frequently update their drivers to either fix bugs and/or add performance enhancements. All major manufactures post the latest drivers on their web sites. As with any software, finding stable versions can be a difficult process. Once you find a stable version of a driver, do not upgrade unless the driver specifically addresses a problem you're having or adds new functionality that you need. Make it a habit to read the release notes for drivers to see what has been fixed/added. Though manufacturers are becoming more and more reluctant to posting these release notes, you can generally find out what's new by calling the manufacturer or searching Deja. Tip - KISS (Keep it simple stupid) Other simple tips:
This really isn't a performance tip, but it greatly enhances your server's usability. When I visit other NT networks, I like to go into Network Neighborhood and see if any of the NT Workstations or Servers have a description. I'd say less than 10% of them out there show up with any description. Because NT doesn't ask for the computer description when asking for the computer name during network setup, most people assume NT doesn't support a description. Win9x both ask for the computer name and the description at the same time. Under NT, the description is tucked away... To add a description to your NT station, go to Control Panel->Server and enter the description in the description box and press OK. Don't be surprised if it takes a few minutes for it to show up. Under Windows 2000, you can set the comment by typing the following at the command line:
This is really helpful for users who can't seem to remember which server houses the printers, or marketing data, etc. Just give each server a meaningful description. I also include the operating system and version in the comment/description. This way, I can see at a glance from the network neighborhood what OSes and versions are present on the network. I do this with the Win9x stations as well.
1997-2004 The Montopolis Group. All rights reserved. All products and company names mentioned here are or may be trademarks or registered trademarks of their respective owners. No part of this article may be reproduced or transmitted in any form or by any means without the prior written permission of the The Montopolis Group. The information in this article is presented without warranty, either express or implied. Neither the author(s) or The Montopolis Group will be held liable for any damages caused or alleged to be caused either directly or indirectly by this article.
|
|||||||||||||||||
| Last Updated on Wednesday, 20 December 2006 04:04 |

