|
rwillyoung commented
3 years ago
I'd like to have a discussion around this script/idea (as it's a much needed script). The question I have to ask is this: Is it functionally more useful to specify a % of disk space you want to always have free or is it functionally more useful to have a "number of revisions" kept? If I setup a script to make sure I always have at least 20% free, I could be artificially creating a performance problem by removing revisions my end users need. Those files would be requested "on demand" and the user would have to wait for them to replicate back over, only to wind up being deleted again. In our view - we see that keeping the latest X revision (usually the head and only the head) is the leanest way to go and solves the performance need for the syncing of data, since we're never accidently deleting a revision that is needed. The trouble with this approach is that provisioning too little storage (to save on storage) and requiring the script/cron to run more frequently eats at CPU cycles. Cachepurge can be a heavy/CPU taxing operation on smaller AWS instance sizes. I placed an enhancement request to the product a long while ago suggesting that p4 pull should take care of this automatically as part of replication. I hope that goes onto the roadmap, but understand that this script is a good workaround for now. Still - the above discussion poses a challenge of approach. If you can reduce the overhead of running this more frequently "somehow" and set the target of keeping X revisions instead of X percent free space, then administrators can allocate less storage overall and save on storage costs. |
Reply ·0 | |
|
|
|
rwillyoung commented
3 years ago
Also - if we're going to continue along the path of "% free space" - perhaps logging the files that get removed and doing a diff/compare on future runs to see if the same files frequently get deleted? This may encourage the administrator to provision more space because "If the same files are always being deleted and then getting requested for replication (coming back) - it means that they are needed files" - if the files are needed, something should be done to reduce the frequency at which they are deleted. |
Reply ·0 | |
|