Repository navigation
storage: make archive index cache eviction policy configurable - #3586
Merged
Merged
Conversation
syphar
marked this pull request as ready for review
October 7, 2026 08:42
GuillaumeGomez
approved these changes
Oct 7, 2026
This branch was successfully deployed
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.
Next step in our optimization journey.
The 200 GiB archive-index cache is under sustained capacity pressure: over four hours, it downloaded 1.56 million indexes and evicted 1.55 million, transferring about 1.17 TiB.
Also, out of ~4.5 million archive index queries, we had to download ~1.5 million index files, which feels like much. But all of that depends on how crawlers work.
We’re trying LRU because accesses often arrive in bursts: after the first crate page, users—and crawlers—request more pages within minutes. TinyLFU can reject a newly downloaded index before those follow-up requests arrive. LRU retains it based on recency, which could reduce repeated downloads during browsing.
The tradeoff is that broad crawler scans may displace popular indexes. With stable traffic, we’ll compare download counts, downloaded bytes, and lookup errors at the same capacity to see whether LRU improves reuse.
If this doesn't help enough, we can build our own TinyLFU with a broader admission window.