-
Notifications
You must be signed in to change notification settings - Fork 845
Cache volumes: RAM cache settings and remap option #12717
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: master
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR adds per-volume RAM cache configuration and a new @volume= remap directive, providing fine-grained control over cache volume selection and RAM cache allocation beyond the existing hostname-based volume selection mechanism.
- Introduces
ram_cache_sizeandram_cache_cutoffparameters in volume.config for per-volume RAM cache control - Adds
@volume=directive in remap.config to override default volume selection - Implements private RAM cache allocation with automatic subtraction from the global pool
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/gold_tests/cache/cache_volume_features.test.py | Test suite entry point for cache volume features |
| tests/gold_tests/cache/cache_volume_features.replay.yaml | Comprehensive test scenarios covering volume selection and RAM cache configurations |
| src/proxy/http/remap/RemapProcessor.cc | Integrates cache_volume override from remap rules into transaction state |
| src/proxy/http/remap/RemapConfig.cc | Parses and validates @Volume= option from remap.config |
| src/proxy/http/HttpCacheSM.cc | Passes volume override to cache operations (open_read/open_write) |
| src/iocore/cache/Stripe.h | Adds ram_cache_size and ram_cache_cutoff fields to CacheVol structure |
| src/iocore/cache/P_CacheHosting.h | Adds ram_cache_size and ram_cache_cutoff to ConfigVol structure |
| src/iocore/cache/P_CacheInternal.h | Updates Cache::open_read/open_write/key_to_stripe signatures with volume_override parameter |
| src/iocore/cache/CacheVC.cc | Implements per-volume RAM cache cutoff logic using volume-specific or global settings |
| src/iocore/cache/CacheProcessor.cc | Implements private RAM allocation calculation and shared pool distribution |
| src/iocore/cache/CacheHosting.cc | Parses ram_cache_size and ram_cache_cutoff from volume.config |
| src/iocore/cache/Cache.cc | Implements volume override selection logic in key_to_stripe function |
| include/proxy/http/remap/UrlMapping.h | Adds cache_volume field to url_mapping class |
| include/proxy/http/remap/RemapConfig.h | Defines REMAP_OPTFLG_VOLUME flag for volume option |
| include/proxy/http/HttpTransact.h | Adds cache_volume_override field to transaction state |
| include/iocore/cache/Cache.h | Updates CacheProcessor API signatures with volume_override parameter |
| doc/admin-guide/files/volume.config.en.rst | Documents ram_cache_size and ram_cache_cutoff configuration options |
| doc/admin-guide/files/remap.config.en.rst | Documents @Volume= directive usage and behavior |
| doc/admin-guide/files/records.yaml.en.rst | Documents interaction between global and per-volume RAM cache settings |
| configs/volume.config.default | Adds examples and documentation for new RAM cache parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3e4aaed to
88d3b83
Compare
0c8b658 to
b56dae1
Compare
This gets a bit complicated because we allow for ATS to start up with remap before the cache is properly started.
5d19907 to
7bd004b
Compare
This adds new configuration options for volume.config, as well as
adding an
@volume=setting to remap.config (avoiding the hosting.configstepping stone).