setcache
Changes cache settings
APPLICABILITY
ClearCase (cleartool subcommand), Attache (command)
SYNOPSIS
- Specify the cache size for a single view:
- setcache -vie·w { -def·ault | -cac·hesize size } { -cvi·ew | view-tag }
- Specify the cache size for a host:
- setcache -vie·w -hos·t { -def·ault | -cac·hesize size }
- Specify the site-wide view cache size:
- setcache -vie·w -sit·e { -def·ault | -cac·hesize size }
- [ -pas·sword registry-password ]
- Specify MVFS cache sizes (dynamic views only):
- setcache -mvfs { -reg·dnc cnt | -noe·ntdnc cnt | -dir·dnc cnt
- | -vob·free cnt | -cvp·free cnt | -rpc·handles cnt } ...
DESCRIPTION
NOTE: Although both kinds of views use caches, cache size is more significant for a dynamic view than for a snapshot view. (The dynamic view's cache size determines the number of VOB lookups that can be stored.) For this reason, the rest of this reference page discusses setcache in the context of dynamic views.
The view_server and the MVFS maintain a number of caches. With setcache, you can adjust the size of the caches to improve performance.
View Caches
The dynamic view caches consist mostly of data retrieved from the VOB and enable the view_server to respond faster to RPCs from client machines. When a view_server process is started, it chooses its cache size from the first of the following sources to yield a value:
- The dynamic view's cache size, which is set with mkview -cachesize or setcache -view -cachesize and stored in the file view-storage-dir\.view (on the -cache line)
- The view_server host's default cache size, which is set with setcache -view -host and stored as a decimal number in the file ccase-home-dir\var\config\view_cache_size
- The site-wide cache default, which is set with setcache -view -site or setsite and stored in the ClearCase site config registry
- The default value: 500 KB on 32-bit platforms, 1 MB on 64-bit platforms
NOTE: If your view uses the host value or the site-wide value and that value is changed, your view's cache size does not change until you invoke setcache -view -default or restart the view_server (with endview -server or a reboot).
The dynamic view cache size is allocated among the individual caches. When specifying a cache size, keep the following guidelines in mind:
- The value cannot be smaller than 50 KB for 32-bit platforms or 100 KB for 64-bit platforms.
- Do not specify a value larger than the amount of physical memory on the server host that you want to dedicate to this view.
- Values greater than approximately 4 MB do not help much in most cases.
- Verify your changes by using getcache to check the hit rates and utilization percentages periodically to see whether they have improved.
MVFS Caches
NOTE: MVFS caches are inapplicable to snapshot views.
A host's MVFS caches are used to optimize file-system performance:
- The directory name cache accelerates name translation. This cache is partitioned into three areas, each of which can be tuned with one of the setcache -mvfs options:
cleartool: Error: Operation "view_mfs_set_cache_sizes" failed: Device
busy.
Ask users to stop using ClearCase actively (that is, keep their view contexts, but stop manipulating files) and enter the setcache command again.
- The attribute cache accelerates access to file metadata (for example, by the stat and access system calls, which are frequently called during make or clearmake operations). The -vobfree option sets the size of the attribute cache for VOB and view-private files that are not currently open.
- The cleartext cache accelerates the open system call for files in a VOB and view-private files. The -cvpfree option sets the size of this cache. This cache is never larger than the size of the attribute cache.
- The RPC handles cache accelerates RPCs to the dynamic view. The -rpchandles option sets the size of this cache; the value ought to be the maximum simultaneous number of RPCs expected from your host. If this value is too small, the getcache -mvfs command recommends that you adjust its size.
Values set with setcache -mvfs are reset when you reboot your machine. To change the values permanently, see Administering ClearCase.
For more information on optimizing performance, see the chapters on performance tuning in Administering ClearCase.
PERMISSIONS AND LOCKS
Permissions Checking:
- With setcache -view, you must be the view owner.
- With setcache -view -host, you must have create/delete/write permissions on the file ccase-home-dir\var\config\view_cache_size.
- With setcache -mvfs, you must be local administrator or a member of the Administrators group.
- With setcache -view -site, you must know the registry password.
Locks: No locks apply. See the permissions reference page.
OPTIONS AND ARGUMENTS
SPECIFYING THE CACHE INFORMATION TO CHANGE. Default: None.
- -vie·w
- Sets the cache size for a single view. This immediately changes the cache size; you do not need to kill and restart the view_server.
- -vie·w -hos·t
- Sets the default cache size for the current host.
- -vie·w -sit·e
- Sets the site-wide default size for view caches.
- -mvfs
- Temporarily sets cache sizes for the MVFS. These values are reset when you reboot your machine.
SETTING THE CACHE SIZE. Default: None.
- -def·ault
- With -view: removes the -cache line from the .view file. This immediately sets the size of the view cache to (in priority order) the host size, the site-wide size, or the default size, as described in the DESCRIPTION section.
- With -view -host: deletes the ccase-home-dir\var\config\view_cache_size file.
- With -view -site: removes the value for the site-wide cache from the ClearCase registry.
- -cac·hesize size
- Specifies a size for the view_server cache. size must be an integer value of bytes, optionally followed by the letter k to specify kilobytes or m to specify megabytes; for example, 800k or 3m.
SPECIFYING THE VIEW. Default: None.
- -cvi·ew
- Sets the cache size for the current view.
- view-tag
- Specifies the view for which the cache size is changed.
SPECIFYING THE REGISTRY PASSWORD. Default: When you set the site-wide view cache size with -view -site, setcache prompts you for the ClearCase registry password.
- -pas·sword registry-password
- Specifies the site-wide registry password.
SPECIFYING MVFS PARAMETERS (NOT APPLICABLE TO SNAPSHOT VIEWS). Default: None. You must specify at least one option. cnt must be an integer value; see Administering ClearCase for information on default and suggested values and instructions on setting the values permanently.
- -reg·dnc cnt
- Sets the number of regular file DNC entries.
- -noe·ntdnc cnt
- Sets the number of ENOENT (file not found) DNC entries.
- -dir·dnc cnt
- Sets the number of directory DNC entries.
- -vob·free cnt
- Sets the number of entries in the attribute cache.
- -cvp·free cnt
- Sets the number of entries in the cleartext cache.
- -rpc·handles cnt
- Sets the number of RPC handles cached by the MVFS.
EXAMPLES
Examples including wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the command interpreter prompt. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.
- Change the cache size for view smg_test.
cmd-context setcache -view -cachesize 800k smg_test
The new view server cache limits are:
Lookup cache: 78624 bytes
Readdir cache: 327680 bytes
File stats cache: 137592 bytes
Object cache: 275184 bytes
Total cache size: 819200 bytes
- Set the site-wide cache size.
cmd-context setcache -view -site -cachesize 2m
Registry password: <enter registry password><ENTER>
...
- Set the number of RPC handles cached by the MVFS to 10 (dynamic views only).
cmd-context setcache -mvfs -rpchandles 10
SEE ALSO
getcache, mvfscache, setsite, view, view_server
Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved.
|