Skip to content
Features

Windows 2000 memory subsystem tweaking

The ins and outs of the Windows 2000 memory subsystem.

Ars Staff | 0
Story text

Introduction

The memory subsystem is always one of the most important systems to tweak within an OS. Not only does it control the RAM, but it also dictates much of how the other subsystems within the computer communicate with each other. Since Windows 2000 is the 'performance' OS of the Microsoft world, it makes sense to squeeze all the speed out of the memory subsystem as possible, hence this article. Within, we will be covering such topics as removing some of the bloat from the OS and tweaking the registry. The different tweaks occur in different areas, but all affect the OS's memory usage. We'll start out with some BIOS tweaks (that are good for just about any PC, not just those with Windows 2000), but with the other tweaks, make sure you've logged off your normal user account and come back in as an administrator, because otherwise some of these optimizations simply won't stick.

?

BIOS Tweaks

There are several settings within the BIOS that can be used to tweak the memory subsystem. Here is a rundown of the most common ones:

CAS Latency - CAS latency is a setting which determines the column access time for the RAM in your system. The lower the latency, the faster and more frequently the computer is able to access the RAM for different pieces of information. SDRAM has a standard latency of 3, but most pieces can handle a latency of 2. You can also buy SDRAM spec'ed to run at CAS 2 for a price. RDRAM, on the other hand, has a much higher latency, and it is more greatly affected by a change in latency, so I wouldn't recommend fooling with latency settings if you are using it. Warning: Lowering the latency of your RAM below its specification is a form of overclocking, so be careful. You might also want to run a stability test (timedemo loop or something similar) after lowering the latency to make sure your system is stable.

RAS to CAS Delay - This setting determines the amount of time between a row activate command and a read/write command. A lower setting is faster, but take the same precautions with this setting as you would with changing the CAS latency.

RAS Precharge Time - This setting determines the number of cycles the RAM requires between DRAM refreshes to accumulate its charge. A lower setting here will speed up the system memory, at the risk of causing instability. Again, be careful to make sure that your system is stable after modifying this setting.

SDRAM Precharge Control - This setting determines how the computer manages the precharging times for the SDRAM. Results may vary with this setting, so test both, and use whichever works best. This setting defaults to disabled on most systems.

Shadow System BIOS - Enabling this setting copies the system BIOS into main memory for faster execution. Most users will have a speed increase with this setting enabled, in both startup time and overall system execution.

System BIOS Cacheable - Enabling this setting will allow the system to cache the BIOS to the L2 cache when necessary, speeding up BIOS execution even more than a shadow. This setting works best when used in conjunction with a shadowed system BIOS.

?

Registry Settings

Several Registry settings can be used to tweak the memory subsystem from within Windows 2000. However, be careful, because it is very easy to kill Win2k by fooling around with the Registry. As was said before, you should be careful to back up copies of any of the values you choose to change, just in case the setting doesn't quite work out for you. The following values can be found at [HKLM/System/CurrentControlSet/Control/Session Manager/Memory Management]:

DisableExecutivePaging - When enabled, this setting will prevent the paging of the Win2k Executive files to the hard drive, causing the OS and most programs to be more responsive. However, it is advised that people should only perform this tweak if they have a significant amount of RAM on their system (more than 128 MB), because this setting does use a substantial portion of your system resources.? By default, the value of this key is 0.? To enable it, set it to 1.

LargeSystemCache - When enabled (the default on Server versions of Windows 2000), this setting tells the OS to devote all but 4 MB of system memory (which is left for disk caching) to the file system cache. The main effect of this is allowing the computer to cache the OS Kernel to memory, making the OS more responsive. The setting is dynamic and if more than 4 MB is needed from the disk cache for some reason, the space will be released to it. By default, 8MB is earmarked for this purpose. This tweak usually makes the OS more responsive. It is a dynamic setting, and the kernel will give up any space deemed necessary for another application (at a performance hit when such changes are needed).?As with the previous key, set the value from 0 to 1 to enable. Note that in doing this, you are consuming more of your system RAM than normal. While LargeSystemCache will cut back usage when other apps need more RAM, this process can impede performance in certain intensive situations. According to Microsoft, the "[0] setting is recommended for servers running applications that do their own memory caching, such as Microsoft SQL Server, and for applications that perform best with ample memory, such as Internet Information Services."

IOPageLockLimit - This tweak is of questionable value to people that aren't running some kind of server off of their computer, but we will include it anyway. This tweak boosts the Input/Output performance of your computer when it is doing a large amount of file transfers and other similar operations. This tweak won't do much of anything for a system without a significant amount of RAM (if you don't have more than 128 MB, don't even bother), but systems with more than 128 MB of RAM will generally find a performance boost by setting this to between 8 and 16 MB. The default is 0.5 MB, or 512 KB. This setting requires a value in bytes, so multiply the desired number of megabytes * 1024 * 1024. That's X * 1048576 (where X is the number, in megabytes). Test out several settings and keep the one which seems to work best for your system.

?

Disabling Startup Programs

Disabling startup programs within Windows 2000 isn't nearly as simple as it is in Windows 9x/Me, where you can manage that task from within the System Information program. The only way to disable startup items that aren't in your Startup folder is to open up Regedit and browse to [HLKMSOFTWAREMICROSOFTWINDOWSCURRENTVERSIONRUN]. From there, you can manually delete the values, which are starting the unwanted applications. We would recommend that you export the values that you intend to delete, however, just in case you make an error.

Non-registry tweaks

h3>Performance Options

There are some tweaking options for Windows 2000 that don't require the use of Regedit, of course. One of them is called Application Response. Effectively, what this setting does is determine whether or not the foreground application gets more of the processor's time than the background programs. This setting can be found within the Performance Options section of the System control panel's Advanced tab. Within Application Response, there are two options: Optimize Performance for Applications, and Optimize Performance for Background Services. The former gives extra processor time to the foreground application, and the latter gives each program the processor time due to it as prescribed by its priority level.

Priority level, if you aren't familiar with the term, is the ranking that the computer uses to determine which programs are more important (and hence get more processor time). This level is determined by two things, Priority Class (Real-Time, High, Normal, Idle) and Thread Priority (Time Critical, Highest, Above Normal, Below Normal, Lowest, Idle). Here's a chart to help you conceptualize the concept:

? ? Priority Class
Thread Priority ? Real-Time High? Normal Idle
Time Critical 31 15 15 15
Highest 26 15 10 6
Above Normal 25 14 9 5
Normal 24 13 8 4
Below Normal 23 12 7 3
Lowest? 22 11 6 2
Idle? 16 1 1 1

?

The ranking, from 1 to 31, determines how much of the computer's time is dedicated to that particular process. We can change the priority class of the program in one of two ways. The first way is through the Task Manager, and is done while the program is already running.? If you right-click on the desired program under the Processes tab, you will be presented with the option of switching the program's priority class. We can also change the priority on program startup by using a special batch file to execute the program. The batch file (.BAT) would look like this when it is open in a text editor:

Echo off
Start /

Example: Echo off
Start /high c:windowsnotepad.exe (not as if you would ever care about the priority class of notepad?)

If you are storing the batch file in the same directory as the file you're running, you don't need the path. If the batch file was being stored in c:windows, and you wanted to run notepad, you could use the form:

Echo off
Start /

Example: Echo off
Start /high notepad.exe

If you needed to use command line options, they can just be added at the end as if you were running the program from the Run dialogue box.? Be aware that changing a program's priority to Real-Time will give it the ultimate priority in the system, to the detriment of all other programs.

?

Disabling Windows File Protection

Normally, I'd spend a significant amount of time discussing, in detail, how to disable windows file protection before continuing with the next topic. However, seeing as we already have a sizable article on the topic here at Ars, I'll just tell you to go look at it and apply the tweak before you continue on with removing POSIX and OS2 support.

?

Removing POSIX & OS2 Support

POSIX is a standard for operating system interoperability that is required of all operating systems purchased by the government, and OS2 support is, well, support for programs originally written for the OS2 platform. Since almost no one has a use for these subsystems, we might as well disable them and save ourselves the wasted memory, right? Sadly, Microsoft hasn't included any official way of disabling these subsystems, so we'll have to do it the old fashioned way, by deleting the files that control it. To do this, first you need to disable Windows File Protection. After that is completed, you will need to delete the following files from your winnt/system32 directory: OS2.exe, OS2SRV.exe, PSXSS.EXE, OS2SS.exe, and POSIX.exe. You may wish to simply rename them, in case their removal causes you some problems.

Of course, once these subsystems are removed, you will no longer be able to use programs which require them. I personally haven't run into any problems, but some people have informed me that certain tools included with the Win2k resource kit require POSIX, so if you can't get something to run, you know why.

?

Removing Extraneous Windows Components

This tweak allows you to have more flexibility when enabling/disabling Windows components, allowing you to remove the games, as well as other parts of the OS that the installer generally doesn't allow you to mess with. To perform the tweak, you need to open the sysoc.inf file (found in the winnt/inf folder) in notepad. Within the file, there are several HIDE commands - delete the word HIDE (but be careful to preserve the commas) everywhere it appears and save the file. You should now have several more options when adding and removing components through the add/remove programs applet in the control panel.

?

Disabling Visual Effects and Sounds

If you aren't using TweakUI (you should really pick up a copy!) to customize your shell, here's an easy way to remove those memory hogging visual effects. Go over to the Display applet and look under the effects tab. I would recommend disabling Use Transition Effects, Smooth Edges of Screen Fonts, Use Large Icons (unless you have bad eyesight), and Show Window Contents while Dragging. If you're using TweakUI, you'll probably want to use that, because it can also be used to tweak out the menu speeds and other similar settings.

Disabling system sounds is another way to preserve precious system memory as well. To do this, simply open up the sounds applet and select the 'No Sounds' scheme from the dropdown menu. Not only will this free up some system memory, but many people find the sounds annoying to begin with - you're probably better off without them.

?

Heap Compaction

This is the process also known (although improperly) as memory defragmentation, and has been used with Win9x for some time. The process is of questionable benefit to Windows 2000, because it manages its memory in an entirely different way than Win9x does, but the information could be useful nonetheless. What is actually occurring when one 'defragments' the system memory is a dumping of main memory to the page file, forcing the computer to reload all of the active information into memory. In computing terms, this is called Heap Compaction, or Garbage Collection. You can use a small, Visual Basic program to perform this action. Simply open up a new file in notepad, input the line Mystring = Space(16000000), and save the file with the .vbs extension.

Assuming you have the Visual Basic runtime libraries installed on your computer (they're installed by default by Win2k), when you execute this file it will flush the system memory. This is particularly useful after running a program with a known memory leak - it can be used to discard the leaked space and allow other programs to use that portion of memory again. If you have a large amount of system memory, you may wish to consider using a higher number within the brackets of the visual basic script - I have tested values up to 80000000 without any problems on my system. Using a higher number should more effectively purge the system memory of leaked space.?

??

0 Comments

Comments are closed.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy