-
Notifications
You must be signed in to change notification settings - Fork 200
Add eviction grace period #1944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add eviction grace period #1944
Conversation
a110bee to
56590db
Compare
|
My main concern with this is that nativelink filesystem store does really badly when it reaches an out of disk space. This isn't an issue with the existing implementation, but with this there's a possibility that it can happen. I think if we're going to introduce this we also need to introduce a hard upper limit which starts evicting stuff that's in the grace period too. |
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 LGTMs obtained, and 0 of 5 files reviewed, and 7 discussions need to be resolved
nativelink-util/src/evicting_map.rs line 321 at r9 (raw file):
}; let (should_evict_initial, _within_grace) = self.should_evict_with_grace_check(
Previously the work of calling should_evict was gated behind self.max_bytes and self.evict_bytes. Now this work is done upfront unnecessarily.
nativelink-util/src/evicting_map.rs line 348 at r9 (raw file):
// Track that grace period blocked an eviction state.grace_period_blocks.inc(); info!(
This could be a very noisy log, it should probably be debug level.
This is a very good point. I need to do some more thinking here. |
Description
Customers have reported problems with to prevent eager evictions and cache thrash. The grace period optionally prevents recently added cache entries from eviction.
Fixes #1943
Type of change
Please delete options that aren't relevant.
How Has This Been Tested?
Please also list any relevant details for your test configuration
Checklist
bazel test //...passes locallygit amendsee some docsThis change is