The amount of local disk space or memory allocated for the Cache Manager to use for its cache affects the speed of file access. A larger cache means the Cache Manager has to contact the File Server machine less often, resulting in fewer cross-network messages. A smaller cache fills sooner, making it more likely that the Cache Manager must discard cached copies of data to make room for newly requested data; if the user requests the discarded data again, the Cache Manager must recontact the File Server machine and refetch the data. A larger cache can make the initial discarding of data unnecessary.
The amount of disk space or memory used for caching depends on several factors. The size of the partition that houses the cache directory or the amount of memory available on the machine places an absolute limit on cache size. Do not use more than 90% of the cache directory's partition for a disk cache; do not use more than 20 to 25% of available memory for a memory cache (this leaves enough memory for processes and applications to run).
Within these limits, devoting more than 40 megabytes to the cache on a machine that does not serve multiple users is normally not useful unless users often work with large amounts of data (accessing large databases, for example). If a machine serves multiple users, a cache of 60 to 70 megabytes may be appropriate. A cache smaller than 5 megabytes can hamper Cache Manager performance; a cache smaller than twice the chunk size is rounded up.
You can reset the cache size for both types of caches by using a text editor to alter the size field in the CacheInfo file and then rebooting the machine; you must be logged in as root or have the write permission on the file to edit it. The -blocks option can also be used with the dfsd command to override the CacheInfo value at reboot. (See Part 2 of this guide and reference for complete information about the dfsd command.)
To alter disk cache size without rebooting the machine, use the cm setcachesize command. The value remains in effect until the machine is next rebooted and reads the value in the CacheInfo file. To display the current cache size, the amount being used, and the type of cache (disk or memory), use the cm getcachesize command.
You must reboot to reset the cache size for a memory-caching machine.
More:
Displaying the Cache Size from the CacheInfo File
Displaying the Current Cache Size and the Amount in Use
Changing the Cache Size Temporarily
Resetting the Cache Size to the Default
Changing the Cache Size Permanently