
SetSystemFileCacheSize V0.1


Small tool to use the new API function SetSystemFileCacheSize availlable under
Windows 2003 Server SP1 and Vista.

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. On AMD64
systems the limit is 4096 because of using 32 bit values only
in this Win32 version. An AMD64 version is required for larger
values.

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

23rd July 2008

