Increase The FileSystem Memory Cache Size In Windows 7

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.

Read also:  Manage Windows 10 Search Indexing

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
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
Please share this article

Facebooktwittergoogle_plusredditlinkedinmail


Filed under:


Responses to Increase The FileSystem Memory Cache Size In Windows 7

  1. oOfmanOo July 8, 2010 at 11:22 am #

    seems to be doing nothing if you read this article.

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

    • nicbot July 8, 2010 at 8:37 pm #

      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.

      • tony February 5, 2014 at 7:18 am #

        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. myT July 8, 2010 at 1:15 pm #

    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

  3. Anonymous July 12, 2010 at 9:25 pm #

    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.

    • Anonymous July 12, 2010 at 9:27 pm #

      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.

  4. lord November 24, 2011 at 7:15 pm #

    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

  5. Valenciaga February 21, 2012 at 6:03 pm #

    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

  6. pjnlsn May 12, 2012 at 10:27 pm #

    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.

  7. MeliaHouse January 30, 2013 at 11:22 am #

    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

  8. q March 24, 2013 at 2:21 pm #

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

  9. Yousaf Khan February 27, 2015 at 10:54 am #

    Very useful.

  10. Anonymous December 29, 2015 at 3:59 pm #

    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.

Leave a Reply