
SetSystemFileCacheSize V0.3


Small tool to use the new API function SetSystemFileCacheSize availlable under
Windows 2003 Server SP1, XP-64, Vista, Windows 7, Server 2008

http://msdn.microsoft.com/library/en-us/sysinfo/base/setsystemfilecachesize.asp




Sets the limits for the size of the working set for the file system cache



Usage samples:

SetSystemFileCacheSize
shows the current Windows settings

SetSystemFileCacheSize /?
shows this help

SetSystemFileCacheSize 8 128
sets the min size to 8 MB and the max size to 128 MB

SetSystemFileCacheSize off 128
disables min size and sets the max size to 128 MB

SetSystemFileCacheSize off off
disables min and max size

SetSystemFileCacheSize flush
flushes the file cache


Must be started with admin previleges.

Shows a messagebox if required, otherwise it's invisible and returns
an errorlevel 0.

On 32bit systems the maximum values seem to be 2047, maybe more
with the /3GB boot.ini switch (not tested).

On x64 systems the limit is 4096 for the Win32 version because of
using 32 bit values only.



Limiting its working set does not mean that the cache manager will never
use more memory for cache than the limit defines. It's the working set
only which is limited. You will still have a large cache when there is
enough availlable memory. But running processes are no more the favourite
victim when new cache memory is required.




Uwe Sieber
mail@uwe-sieber.de

March 2010

