ghacks Technology News

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 which. 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 with many file operations, useful in every situation with an increased amount of read write operations.

Changing the setting with 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

elevated command prompt

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

fsutil behavior set memoryusage 2

fsutil memoryusage

fsutil memoryusage

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

Windows users who would like to restore the old setting can issue 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

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 in 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.

(inspiration for this article taken from WebTlk)

Related Articles:

Get To Know Linux: See Your Systems’ Memory Usage
Memory Fox Flushes Firefox’s Memory Constantly
Increase Outlook 2010 Attachment Size
Safari on Windows is not really memory efficient
How To Change Google Chrome’s Cache Location And Size

Enjoyed the article?: Then sign-up for our free newsletter or RSS feed to kick off your day with the latest technology news and tips, or share the article with your friends and contacts on Facebook, Twitter or Google+ using the icons below.



About the Author:Martin Brinkmann is a journalist from Germany who founded Ghacks Technology News Back in 2005. He is passionate about all things tech and knows the Internet and computers like the back of his hand. You can follow Martin on Facebook or Twitter.

Author: , Thursday July 8, 2010 -
Tags:, , , ,


Responses so far:

  1. oOfmanOo says:

    seems to be doing nothing if you read this article.

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

    • nicbot says:

      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.

  2. myT says:

    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=0×0
    SET VALUE_DEFAULT=0×1
    SET VALUE_INCREASED=0×2
    :: 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 says:

    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 says:

      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 says:

    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 says:

    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 says:

    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.

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

Subscribe without commenting

© 2005-2012 Ghacks.net. All Rights Reserved. Privacy Policy - About Us