Memory Tweaks

Managing the Page File (Virtual Memory)  - called "Swap File" with Win 95/98

System Memory (RAM) is Fast . . . Hard Drive is slow.  When XP has used up all the RAM, it simulates more RAM by using a section of the hard drive - this section is actually a file, and it is called "virtual memory" and it is dog slow.  So you want to optimize the swap file by keeping it defragmented.  Well, how do files get fragmented?  When they change in size or are moved !!  So the idea here is to prevent the swap file from changing in size and to keep it in the same place - preferably on the outside tracks of the disk (the fastest portion). 

To keep the swap file from changing size:
  1. Control Panel/System/Performance and Maintenance . . . Advanced Tab
  2. Performance . . .Settings
  3. under virtual Memory click Change
  4. set the Initial and Maximum size to the same size

The optimal memory setting for users with 128 MB+ is approximately 1.5-2 times the RAM size, users with 64 MB should use a 2 times multiple. You should also locate Virtual Memory on your fastest drive or striped RAID volume, placing it on the non-boot drive, can help increase performance. Defragment after setting this to minimize fragmentation and force the swap file to get located on the fastest part of your disk. Third party defragmentaters can optimize the swap file.

To defragment the hard drive - use Norton Speedisk

NOTE:  always make sure your system has enough RAM. 128MB is the absolute minimum, 512MB is preferred. You can bring up the Performance Tab of the Task Manager to ensure that Total Commit Charge is lower than your Total Physical Memory. If not, add ram.

 

Memory Tweaks

There are 3 tweaks you can make to change how XP uses memory.

1) Start/Run . . . regedit

2) goto:

 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\

3)  change the following three keys:

Disable Paging Executive:
XP pages data from RAM memory to the hard drive. We can stop this happening and keep more data in RAM, resulting in better performance. Users with a large amount of RAM (256MB+) should use this setting. The setting we change to disable the ’Paging Executive’, is DisablePagingExecutive. Changing the value of this key from 0 to 1 will de-activate memory paging.

System Cache Boost:
Changing the value of the key LargeSystemCache from 0 to 1 will tell XP to allocate all but 4MB of system memory to the file system cache, allowing the XP Kernel to run in memory. The 4MB of memory left is used for disk caching, if more is needed, XP allocates more. Generally, this tweak improves performance by a fair bit but can, in some intensive applications, degrade performance. As with the previous tweak, you should have at least 256MB of RAM before attempting to enable LargeSystemCache.

Input/Output Performance:
This improves performance of large file transfers. If this entry does not appear in the registry, you will have to create a REG_DWORD value called IoPageLockLimit. The data for this value is in number of bytes, and defaults to Zero which equates to 512KB on machines that have the value. Most people using this tweak have found maximum performance in the 8 to 16 megabyte range, so you will have to play around with the value to find the best performance. The value is measured in bytes, so if you want, 12MB allocated, it’s 12 * 1024 * 1024, or 12582912. As with all these memory tweaks, you should only use this if you have 256MB or more of RAM.