Auto-configure p4pcm.pl '-t{low|high}' thresholds per available storage.
The Proxy Cache maintainer script currently requires manual configuration
of the crontab entry, configuring `-tlow` and '-thigh` thresholds. A
good manual practice is to configure these thresholds to correspond to
something like 97% and 92% available storage, so that the proxy space
available oscilates between those numbers, keeping the cache largely full
(for optimum benefit) but never filling up.
The gist of this request is to provide an a way to look at output of,
say, df -h /p4/N/cache and based on that, determine appropriate values to
automate the manual practice.
This could result in updating the crontab entry for p4pcm.pl, adding the
'-tlow' and '-thigh' options.
The new 1.5 version of p4pcm.pl supports percentage thresholds. Default settings are 12% for low and 20% for high. The 12% allows a chance for the script to run before the disk space gets into the 10% or less range which seems to be where monitoring alerts typically come into play.
These coded defaults are based on observations of a production proxy for a customer doing unreal development. The suggested 3% low 8% high in the job description is unlikely to allow for enough "play" in the typical unreal world to detect before exhaustion. With unreal, hundreds of cached files can change in a short period of time which quickly fills the cache. Of course a very large proxy cache is an alternative. Regardless of the coded defaults, with a roughly 300G cache, p4pcm runs every 2 hours with a 20% low and 35% high. With this 2 hour cycle, low trigger is often between 16% and 18%. The original once a day script run (the current crontab default) was often finding 7% to 8% low trigger and failed once with exhausted disk space. Current steady state is a need for cache cleans about once every 10 days. On average, the last delete is a file last accessed roughly 15 days ago. Just some additional input on setting defaults.
The new 1.5 version of p4pcm.pl supports percentage thresholds. Default settings are 12% for low and 20% for high. The 12% allows a chance for the script to run before the disk space gets into the 10% or less range which seems to be where monitoring alerts typically come into play.
These coded defaults are based on observations of a production proxy for a customer doing unreal development. The suggested 3% low 8% high in the job description is unlikely to allow for enough "play" in the typical unreal world to detect before exhaustion. With unreal, hundreds of cached files can change in a short period of time which quickly fills the cache. Of course a very large proxy cache is an alternative. Regardless of the coded defaults, with a roughly 300G cache, p4pcm runs every 2 hours with a 20% low and 35% high. With this 2 hour cycle, low trigger is often between 16% and 18%. The original once a day script run (the current crontab default) was often finding 7% to 8% low trigger and failed once with exhausted disk space. Current steady state is a need for cache cleans about once every 10 days. On average, the last delete is a file last accessed roughly 15 days ago. Just some additional input on setting defaults.