Skip to content

Default cache file-usage purge bands as percentages of disk#3518

Merged
jhiemstrawisc merged 2 commits into
PelicanPlatform:mainfrom
jhiemstrawisc:kingfisher-defaults
Jun 18, 2026
Merged

Default cache file-usage purge bands as percentages of disk#3518
jhiemstrawisc merged 2 commits into
PelicanPlatform:mainfrom
jhiemstrawisc:kingfisher-defaults

Conversation

@jhiemstrawisc

Copy link
Copy Markdown
Member

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.

@jhiemstrawisc jhiemstrawisc added lotman cache Issue relating to the cache component enhancement New feature or request labels Jun 15, 2026
@jhiemstrawisc jhiemstrawisc added this to the v7.27 milestone Jun 15, 2026
@jhiemstrawisc

Copy link
Copy Markdown
Member Author

Closes #3519

@jhiemstrawisc jhiemstrawisc linked an issue Jun 15, 2026 that may be closed by this pull request
@jhiemstrawisc jhiemstrawisc requested review from h2zh and turetske June 15, 2026 19:21
@jhiemstrawisc

Copy link
Copy Markdown
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 Cache.EnableLotman, and all the configuration for Lotman is automatically bootstrapped for a successful startup.

@h2zh h2zh self-assigned this Jun 16, 2026
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

@h2zh h2zh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read through the code and they all look good. Just a small tiny trivial comment.

Comment thread config/config.go Outdated
@jhiemstrawisc jhiemstrawisc merged commit e547893 into PelicanPlatform:main Jun 18, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cache Issue relating to the cache component enhancement New feature or request lotman

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish steps needed for "on-by-default" lotman-enabled cache

2 participants