Sets the size of a disk cache
Synopsis
cm setcachesize {-size kbytes | -reset} [-help]
Options
-size kbytes
Specifies the number of 1-kilobyte blocks the Cache Manager can use for the cache. The smallest allowable value is 1. Specifying a value of 0 (zero)
sets the cache size to the default specified in the CacheInfo file. Use this option or use the -reset option.
-reset
Returns the cache size to the value set when the machine was last booted. Use this option or use the -size option.
-help
Prints the online help for this command. All other valid options specified with this option are ignored.
Description
The cm setcachesize command changes the amount of local disk space the Cache Manager uses for its data cache. Specify a number of kilobyte blocks. Do not
set the cache size to exceed 90% of the actual disk space available for the cache directory; the cache implementation itself requires a small amount of room on the partition. Do not use
this command on a machine using a memory cache.
The cache size cannot be set to a value less than twice the value of the chunk size in use by the Cache Manager. If a value smaller than twice the chunk size is specified with the -size option, the following message is displayed:
path: Cache size of size is too small; value was rounded up.
In the message, path is the specified path to the cm program (usually just cm) and size is the size, in kilobytes, specified with the command. The standard message reporting the new cache size (the size to which the cache was rounded) is then displayed; see the section on output for an example of the message.
To return the cache size to the default value specified in the CacheInfo file, specify 0 (zero) as the number of kilobyte blocks with the -size option. To return the cache size to the value set when the machine was last booted, use the -reset option instead of the -size option; the -reset option also sets the size to the amount specified in the CacheInfo file unless the -blocks option was used with the dfsd command to override the CacheInfo value, in which case the value set with the dfsd command is used.
The cm getcachesize command displays the current cache size and the amount of space in use for both disk and memory caches. It also reports the type of cache (disk or memory) in use.
Privilege Required
The issuer must be logged in as root on the local machine.
Output
The following message is displayed whenever this command is used to set the cache size:
path: New cache size set: size.
In the message, path is the specified path to the cm program (usually just cm) and size is the new cache size, in kilobytes.
Examples
The following command sets the cache size to 25,000 kilobyte blocks:
# cm setca 25000
cm: New cache size set: 25000.
The following command resets the cache size to the value set when the machine was last booted (50,000 kilobyte blocks, in this case):
# cm setca -r
cm: New cache size set: 50000.
Related Information
Commands: cm getcachesize(8dfs)
Files: CacheInfo(4dfs)