Default cache file-usage purge bands as percentages of disk#3518
Merged
jhiemstrawisc merged 2 commits intoJun 18, 2026
Conversation
Member
Author
|
Closes #3519 |
Member
Author
|
@turetske and @h2zh this is one of those loose ends I'm trying to close. I'm pinging you for review in case you have some time and interest to look at this before I merge it later this week. I've already tested manually that this is sufficient to set |
cda2130 to
7c8d331
Compare
Enabling Lotman is gated on also hand-sizing pfc.diskusage's file-usage band (Cache.FilesBaseSize/NominalSize/MaxSize), which xrootd requires to sit below the low watermark. No single absolute-size default can satisfy that on caches of differing disk sizes, so let these accept integer percentages (as the watermarks already do) and default them to percentages of total disk. Percentages scale with any cache and stay ordered below a percentage low watermark, which is the missing prerequisite for turning Lotman on without extra configuration. Scope the defaults to when Lotman is enabled, and only when the operator set none of the three, so a plain cache's purge behaviour is unchanged and the existing all-or-none rule is preserved. Because the file sizes and the low watermark can now both be percentages, validate the max-below-low-watermark ordering up front when the two are expressed the same way and defer the mixed percentage/absolute case to xrootd, which alone knows the real disk total. Also correct the documented low/high watermark defaults, which had drifted from the shipped 85/89 values. rebase
7c8d331 to
bb26894
Compare
h2zh
approved these changes
Jun 18, 2026
h2zh
left a comment
Contributor
There was a problem hiding this comment.
I read through the code and they all look good. Just a small tiny trivial comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling Lotman is gated on also hand-sizing pfc.diskusage's file-usage band (Cache.FilesBaseSize/NominalSize/MaxSize), which xrootd requires to sit below the low watermark. No single absolute-size default can satisfy that on caches of differing disk sizes, so let these accept integer percentages (as the watermarks already do) and default them to percentages of total disk. Percentages scale with any cache and stay ordered below a percentage low watermark, which is the missing prerequisite for turning Lotman on without extra configuration.
Scope the defaults to when Lotman is enabled, and only when the operator set none of the three, so a plain cache's purge behaviour is unchanged and the existing all-or-none rule is preserved. Because the file sizes and the low watermark can now both be percentages, validate the max-below-low-watermark ordering up front when the two are expressed the same way and defer the mixed percentage/absolute case to xrootd, which alone knows the real disk total.
Also correct the documented low/high watermark defaults, which had drifted from the shipped 85/89 values.