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.
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
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:
Locate the entry NtfsMemoryUsage in the right window. Three possible values can be set:
- Not Set: 0
- Default: 1
- Increased: 2
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.
seems to be doing nothing if you read this article.
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’.
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?
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.
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, [email protected] 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.
Little script to switch between different cache settings:
:: 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
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.
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.
this tweak does not work.
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
Microsoft Disagrees with you:
Straight from the horses mouth. Now stop spreading misinformation.
Only tool that really change the cache it is the Sysinternal tool CacheSet V1 (it work fine in W7 to). Enjoy.
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.
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 :-)
So, what usage takes place when settng is 0 ?
(Mine shows 0).
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.