pub enum Verdict {
Hold,
Shrink {
factor: f64,
},
SkipShrinkLeanCaches {
cache_bytes: u64,
rss_bytes: u64,
cache_share: f64,
},
SkipShrinkFlatCaches {
cache_bytes: u64,
previous_cache_bytes: u64,
cache_count: u32,
previous_cache_count: u32,
rss_bytes: u64,
},
Grow {
headroom_bytes: u64,
},
}Expand description
What the policy decided this tick. Shared across all caches in the same reapportionment (every cache gets the same regime).
Variants§
Hold
RSS is inside the hysteresis band — caps held steady.
Shrink
RSS over target × SHRINK_RATIO; every cap multiplied by
target / rss.
SkipShrinkLeanCaches
RSS over target × SHRINK_RATIO, but the sum of cache
current_bytes is < MIN_CACHE_SHARE_FOR_SHRINK of RSS —
shrinking caches would not meaningfully reduce RSS, so the
policy holds. The growth is coming from a non-cache allocator
(transient parser/reasoner state, leaked buffer, etc.).
Fields
cache_bytes / rss_bytes, in [0.0, 1.0].
SkipShrinkFlatCaches
RSS over target × SHRINK_RATIO, but the cache subsystem did
not grow between the previous tick and this one (cache_count
is flat AND cache_bytes is within
FLAT_CACHE_TOLERANCE of the previous reading). The RSS
climb came from outside the cache subsystem — shrinking caches
would trade away a useful working set for an unrelated
allocator’s growth (e.g. parser, query-engine, or reasoner working
memory).
Fields
Grow
RSS under target × GROW_RATIO; caches grew toward their
preferred_max_bytes ceilings, weighted by hit rate.