Skip to content

Conversation

@zwoop
Copy link
Contributor

@zwoop zwoop commented Dec 2, 2025

This adds new configuration options for volume.config, as well as
adding an @volume= setting to remap.config (avoiding the hosting.config
stepping stone).

@zwoop zwoop added this to the 10.2.0 milestone Dec 2, 2025
@zwoop zwoop requested a review from Copilot December 2, 2025 21:36
@zwoop zwoop self-assigned this Dec 2, 2025
@zwoop zwoop added the Cache label Dec 2, 2025
Copy link
Contributor

Copilot AI left a 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_size and ram_cache_cutoff parameters 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.

@zwoop zwoop force-pushed the RamCacheVolume branch 2 times, most recently from 3e4aaed to 88d3b83 Compare December 2, 2025 23:48
@zwoop zwoop marked this pull request as draft December 8, 2025 20:33
@zwoop zwoop force-pushed the RamCacheVolume branch 2 times, most recently from 0c8b658 to b56dae1 Compare December 9, 2025 22:24
@zwoop zwoop marked this pull request as ready for review December 9, 2025 22:27
@apache apache deleted a comment from zwoop Dec 10, 2025
This gets a bit complicated because we allow for ATS to start
up with remap before the cache is properly started.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant