Increase the FileSystem Memory Cache Size in Vista

I’ve always wondered why Windows doesn’t allow you to set an arbitrary size for the filesystem cache. What if you have a slow hard drive in your laptop, but loads of available system memory? Shouldn’t you be able to maximize that memory in order to speed up hard drive access?

I’ve found a slightly documented tweak that will allow you to tell Windows to use more cache for the NTFS “pool”, which should increase performance if your system opens and closes a lot of files all the time like mine does.

According to the Microsoft documentation:

Increasing physical memory does not always increase the amount of paged pool memory available to NTFS. Setting memoryusage to 2 raises the limit of paged pool memory. This might improve performance if your system is opening and closing many files in the same file set and is not already using large amounts of system memory for other applications or for cache memory. If your computer is already using large amounts of system memory for other applications or for cache memory, increasing the limit of NTFS paged and non-paged pool memory reduces the available pool memory for other processes. This might reduce overall system performance.

I’ll be testing this change out myself, and I really hope to get feedback from our excellent readers on this one. Please note that I’ve not run any benchmarks yet, so I can’t confirm yet that this yields any major benefit in real-world performance.

Command Line Hack

Open up an Administrator mode command prompt by right-clicking and choosing Run as Administrator, or type in cmd into the start menu search box and use Ctrl+Shift+Enter.

Type in the following command to increase the cache setting:

fsutil behavior set memoryusage 2

To check the current value, type in this command:

fsutil behavior query memoryusage

To change the setting back to the default, use this command:

fsutil behavior set memoryusage 1

image

As always, these “slightly” documented settings can screw up your system, so perform at your own risk. Also, you’ll likely have to reboot the machine to see any difference.

Manual Registry Hack

You can also set this value by changing a registry parameter. Open up regedit.exe through the start menu search or run box, and then navigate down to the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

image

Double-click on the NtfsMemoryUsage key on the right-hand side and change the value to 2. Here’s the available values:

  • Not Set: 0
  • Set to Default: 1
  • Increase Cache: 2

According to the documentation the default setting is “1”, but by default the key is set to “0”. Typically in that scenario the setting of “0” means “Not Set”, which means the system uses the default setting. You should be able to change the value to either “0” or “1” in order to change this back to default.

This setting also works in Windows Server 2003.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.