Repository navigation
Description
Parent Issue
Parent issue: #32278
Detail of Subtask
Catalog ID: D09
Origin: B - Pre-existing in the 4.2 baseline and retained on main
Evidence level: Duplicate actions confirmed by source and a synthetic probe
4.2 versus main: provenance
4.2 already registers RSS scavenging/cache pressure on both CNFlushS3 and Workspace throttlers; main retains this. These are not two newly introduced main budgets. The reviewed pressure-state paths are substantially identical on both branches.
Design problem, impact, and existing responsibility
Both components sample the same process RSS, maintain hysteresis/generation/cooldown, and trigger global cache eviction and FreeOSMemory. Fileservice then combines cn-rss/workspace-rss targets. Independent component reservations have valid responsibilities; duplication of process-wide actions needs separate evaluation.
Acceptance criteria
- Equivalent global actions for one process-pressure event have an explicit coordinator; components neither clear each other's valid targets nor repeat equivalent recovery work.
- Preserve soft/hard hysteresis, recovery on pressure exit, TTL fallback, suppression of stale async callbacks, and component admission correctness.
- Measure pressure/recovery and normal throughput proportionally. Use callbacks and minimal data for functional tests rather than inducing real OOM in UT.
Describe implementation you've considered
Preserve the state/recovery requirements implemented for #24664, then consolidate process-wide action ownership and cooldown in existing CN/resource control. Keep independent workspace/flush admission and standalone-engine use cases. Do not add a general resource-management framework.
Additional information
Existing investigation and validation limits
Using production component ratios of 90%/5%, a synthetic total of 4GiB, RSS of 3600MiB, and reservations of 32MiB each, real tryScavengeRSS requests two global evictions and four forced GCs. Callbacks are replaced with counters; the test neither allocates 3.6GiB nor performs four GCs. Normal and 100 race repetitions confirm the action structure, not a production GC storm.
main investigation snapshot: pkg/common/rscthrottler/resource_throttler.go:251; pkg/cnservice/server.go:271; pkg/vm/engine/disttae/engine.go:192
4.2 baseline snapshot: pkg/common/rscthrottler/resource_throttler.go:251; pkg/cnservice/server.go:245
The named probes are local diagnostic overlays, not committed repository tests. Their names identify the investigation; they cannot be selected directly from an ordinary checkout. Implement the smallest maintained contract regressions and reuse relevant CI/validation proportionally. Temporary evidence commits are not required.
Related existing work: #24664, #25127. Closed items identify implemented controls or historical context; they do not mean this subtask is already resolved.
Activity
[-][Subtask]: D09 [base] 收敛进程 RSS 压力动作的 owner,保留组件独立 reservation[/-][+][Subtask]: D09 [baseline] Coordinate process-wide RSS pressure actions while retaining component reservations[/+]fix(memory): coordinate process-wide RSS recovery (#33039)