Increase The FileSystem Memory Cache Size In Windows 7

Martin Brinkmann
Jul 8, 2010
Updated • Sep 14, 2015
Tutorials, Windows tips
|
18

File operations on Windows NT based systems make use of a limited pool of kernel buffers. This may slow down or even bring to a halt file operations on Windows if the buffers are filled up so that they, for the the time being, cannot accept new file operations.

The memory usage of the buffers can be increased from an elevated command line prompt or the Windows Registry.

It in theory speeds up situations where many file operations need to be performed quickly, useful in every situation with an increased number of read write operations.

Changing the setting will increase the paged and non-paged memory usage of the buffers which indicates that this tweak should only be used if enough spare system memory is available on the PC.

Microsoft TechNet offers the following description of the memoryusage value:

Configures the internal cache levels of NTFS paged pool and NTFS non-paged pool memory. Set to 1 or 2. When set to 1 (the default), NTFS uses the default amount of paged pool memory. When set to 2, NTFS increases the size of its lookaside lists and memory thresholds. A lookaside list is a pool of fixed-size kernel memory buffers that the kernel and device drivers create as private memory caches for file system operations, such as reading a file.

Increasing Memory Usage via the command line

An elevated command prompt is required for this operation. Click start, then All Programs, locate Accessories, right-click Command Prompt in the listing and select to Run As Administrator.

elevated command prompt

You may alternatively hit the Windows key, type cmd, right-click on the cmd.exe result and select "run as administrator" from the menu instead.

Run the following command to increase the limit of paged pool memory:

fsutil behavior set memoryusage 2

fsutil memoryusage

Windows will return the new value in the same command prompt.

Windows users who would like to restore the old setting can run the following command instead:

fsutil behavior set memoryusage 1

Increasing Memory Usage via the Windows Registry:

Open the Windows Registry Editor by either clicking on Start again and typing in regedit in the run box or by pressing Windows-R and typing in regedit in the opening run dialog window.

Navigate to the following Registry key:

HKEY_LOCAL_MACHINE\SYSTEM \CurrentControlSet\Control\FileSystem

Locate the entry NtfsMemoryUsage in the right window. Three possible values can be set:

  • Not Set: 0
  • Default: 1
  • Increased: 2

registry memory usage

A restart of the computer system is required before the change will take effect, regardless whether it has been applied to the Registry or the command line.

It is probably a good idea to test the system in real-life situations after the restart to see if the speed gains are noticeable and verify that it continues to run stable.

This setting should be available on all Windows NT based systems. We have verified that it is available in Windows Vista, Windows 7 and the Windows Server line. Would be nice if Windows XP users could see if it is also available in that operating system.

: The same method works in newer versions of Windows, such as Windows 8 and 10, as well.

Summary
Increase The FileSystem Memory Cache Size In Windows 7
Article Name
Increase The FileSystem Memory Cache Size In Windows 7
Description
Use the following tweak to increase the file system memory cache size in Windows to prepare the system for running more file operations.
Author
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Anonymous said on December 29, 2015 at 3:59 pm
    Reply

    Rafael Rivera is incorrect, besides fsutil.exe, that registry value name (NtfsMemoryUsage) is found in ntfs.sys (Windows 7 x64 SP1) !
    So at least the driver IS reading the value, what it does with it is another question.

  2. Yousaf Khan said on February 27, 2015 at 10:54 am
    Reply

    Very useful.

  3. q said on March 24, 2013 at 2:21 pm
    Reply

    So, what usage takes place when settng is 0 ?
    (Mine shows 0).

  4. MeliaHouse said on January 30, 2013 at 11:22 am
    Reply

    Many many thanks Martin,

    The most noticeable effect was on opening ‘PaperPort’, as all the scanned documents literally flew open as opposed to taking c1 minute.

    Keep up the good work :-)

    Derek

  5. pjnlsn said on May 12, 2012 at 10:27 pm
    Reply

    Thanks for the tip, I recently starting dual booting windows 7 so I could play more games.

    Although, this is just one of the ways in which linux is way way better than windows. Like all linux distros have been doing this, by default, for years. And they deallocate it without a fuss, which, while since windows vista cached memory is *supposed* to be deallocated if another program needs it…sometimes it just doesn’t happen, for whatever reason.

    The superior operating system of the future will be a streamlined, more easily usable linux. Linux is already superior in terms of sophistication.

  6. Valenciaga said on February 21, 2012 at 6:03 pm
    Reply

    Only tool that really change the cache it is the Sysinternal tool CacheSet V1 (it work fine in W7 to). Enjoy.

    http://technet.microsoft.com/en-gb/sysinternals/bb897561

  7. lord said on November 24, 2011 at 7:15 pm
    Reply

    this tweak does not work.

    http://www.tweakhound.com/blog/?p=1164

    Rafael Rivera of WithinWindows.com. Here is his reply:
    “That registry value is only referenced in fsutil.exe. It is not referenced in any other system binary within Windows 7, meaning the value is purely there for compatibility reasons (otherwise does nothing). Increases in performance are purely imagined. You can quote me ” Rafael Rivera

    1. Techie007 said on May 11, 2023 at 11:18 pm
      Reply

      I can confirm that this value is in fact read very early on during bootup by the System process in Windows 11, and that this string appears in ntfs.sys. You can use Process Monitor and a Hex editor to confirm these findings yourself. So Rafael is wrong, and this setting is in fact liable to do something–unlike some other popular tweaks, whose values are never read at any time and don’t exist anywhere but in the registry, left over from like Windows 95 or something. What exactly it does is what is debatable.

    2. Jason said on January 15, 2016 at 2:08 am
      Reply

      Microsoft Disagrees with you:
      https://technet.microsoft.com/en-us/library/cc785435.aspx

      Straight from the horses mouth. Now stop spreading misinformation.

  8. Anonymous said on July 12, 2010 at 9:25 pm
    Reply

    Since reading your bad tweaks section more than once I always have enough suspicion to not just start operating on Windows like a mad scientist.

    1. Anonymous said on July 12, 2010 at 9:27 pm
      Reply

      Oops, should say since reading Tweakhound’s bad tweaks section more than once I always have enough suspicion to not just start operating on Windows like a mad scientist.

  9. myT said on July 8, 2010 at 1:15 pm
    Reply

    Little script to switch between different cache settings:

    @echo off
    SET REG_FOLDER=HKLM\System\CurrentControlSet\Control\FileSystem
    SET REG_ELEM=NtfsMemoryUsage
    SET REG_TYPE=REG_DWORD
    SET VALUE_NOT_SET=0x0
    SET VALUE_DEFAULT=0x1
    SET VALUE_INCREASED=0x2
    :: delims is a TAB followed by a space
    FOR /F “tokens=2* delims= ” %%A IN (‘REG QUERY “%%REG_FOLDER%%” /v %%REG_ELEM%%’) DO SET RETRIEVED_VALUE=%%B
    IF %RETRIEVED_VALUE%==%VALUE_NOT_SET% REG ADD %REG_FOLDER% /v %REG_ELEM% /t %REG_TYPE% /d %VALUE_INCREASED% /F
    IF %RETRIEVED_VALUE%==%VALUE_NOT_SET% echo NTFS File system cache INCREASED, restart required to take effect
    IF %RETRIEVED_VALUE%==%VALUE_INCREASED% REG ADD %REG_FOLDER% /v %REG_ELEM% /t %REG_TYPE% /d %VALUE_INCREASED% /F
    IF %RETRIEVED_VALUE%==%VALUE_INCREASED% echo NTFS File system cache reset to DEFAULT, restart required to take effect
    IF %RETRIEVED_VALUE%==%VALUE_DEFAULT% REG ADD %REG_FOLDER% /v %REG_ELEM% /t %REG_TYPE% /d %VALUE_INCREASED% /F
    IF %RETRIEVED_VALUE%==%VALUE_DEFAULT% echo NTFS File system cache INCREASED, restart required to take effect

  10. oOfmanOo said on July 8, 2010 at 11:22 am
    Reply

    seems to be doing nothing if you read this article.

    http://www.tweakhound.com/blog/?p=1164

    1. nicbot said on July 8, 2010 at 8:37 pm
      Reply

      Thanks oOfmanOo, that link probably saved us all a lot of confusion and delusion :) The author might want to update his article with at least a reference to the potential misgivings of this hyped ‘tweak’.

      Thanks again.

      1. tony said on February 5, 2014 at 7:18 am
        Reply

        well the setting would work better if used with the setting for large page pool.
        LargeSystemCache If you do not increase the page pool how can the file system use more?

      2. aswdf said on November 5, 2019 at 7:55 am
        Reply

        Very siply. Because those are completely different engines. Memoryusage was increasing buffers for NTFS node traversal(lookup). It is a memory for low-level NTFS driver. In early 90s, on systems with a few MB of total physical RAM this size was restricted for giving more space to high level processes. I.e. it can be considered a cache for FS metadata ONLY.
        Today after the driver was updated many times, with Gigabytes of RAM available, it has no meaning, and left for compatibility.
        LargeSystemCache on the other hand, is a high level file cache. I.e. a cache for actual stored data, both, read by demand user data and, PE executable data, which is a part of virtual memory space.

      3. asgas said on November 5, 2019 at 8:22 am
        Reply

        P.S. “paged pool” in MS slang means a virtual space, which can be allocated at disk partially, for later usage. I.e. then traversing MFT there is no need to free up the memory from passed(and not parsed) index entries, those are kept in place and dropped to page-file by kernel, when physical RAM is low, but can be fetched back the moment the driver tries to look-back the B-tree. So it is like caching a distributed FS tree into one place in unified RAM/swap space, which is faster than waiting for HDD heads jump around the disk again and again for reading the same FS index parts. However, if the system is very low on memory, and the disk is very slow (1990s, 4Mb RAM, 128Mb@4500 rpm IDE), it can have an opposite effect of fetching that data slower than traversing the (generally small at that time) FS index back. So probably it is the reason for hard restrictions to be imposed in early NT versions.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.