Avamar uses two files for tuning performance on the client side. The File Cache (f_cache.dat) and the Hash Cache (p_cache.dat). The values affecting these files can be modified with switches and configuration to increase efficiency of the application.
The file cache, or f_cache.dat, is a list of files on the client. When this file gets a "hit" the Avamar client skips it because it is already on the backup server and a marker is sent in its place.After the initial backup, 98% of the files on the client will be a hit and not sent over the wire.
The hash cache, or p_cache.dat, is a list of the individual chunks of data that have been transferred. This is most beneficial on database files and large files.
If the file cache is undersized, each file on the client needs to be opened, read, chunked, hashed and checked for on the server. This increases processing and memory utilization as well as network to retrieve the cache. If the hash cache is undersized, it needs to check back with the Avamar server for every chunk.
f_cache.dat is limited to 1/8 physical RAM, and p_cache.dat is limited to 1/16 physical RAM. The file size will double until it reaches the max instead of incrementing proportionately.
To tune the file cache, the formula is:
(# of million files) * 44 MB
To tune the hash cache, the formula is:
1 MB per 1 GB of database file
Also, it takes about 60 minutes for every million files or 100 GB of database data. If your backup takes 30% longer than these values, the cache files should be examined for correct sizing. The avtar process logs the size of the cache files when it starts and also when it ends.
To determine the maximum size for f_cache.dat, use N * 44 MB * 2 and use the "--filecachemax=<size in MB> | <size in fraction>" with the avtar command. A negative number denotes a fraction (-8 is 1/8, -16 is 1/16). If size of the f_cache is being reduced, the original must be deleted and restarted. Also, setting to a number will limit the cache file to the closest "doubling" of the original cache file instead of allowing growth to that max. Furthermore, the cache file is limited to the last doubling when a multiple is used in the filecachemax number is set instead of using a fraction.
For tuning the p_cache.dat, the max file size is calculated as 2*Y MB, where Y is the number of GB in the data base. The caveats for f_cache tuning apply also to p_cache.
When tuning the file and hash caches, the goal is to not allow data to go to swap on the hard drive. Also, do not use more than 25% of physical RAM, and whenever possible use the fraction in filecachemax instead of a specific number. On a file server, increase the f_cache, although at some point more RAM may simply need to be added when the cache grows larger than 1/8 physical ram.
Another option for tuning cache files would be to have multiple, smaller data sets on a given client. Then set the "--cacheprefix" to a different value for each data set, which would create a separate cache file for each. Be sure you have enough disk space to accommodate. You can also set a different var directory by using the "avtar --vardir=<path>" command.
No comments:
Post a Comment