You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor GC cost includes several O(old-gen) components even when nothing old is touched:
Sweep visits/rewrites every old-gen header on every minor (gc/oldgen.rs:1181-1225 cursor over all regions; flags/accounting rewrites gc/oldgen.rs:1291-1311,1338,1357; minors set reclaim_dead_old_blocks=false but still walk, gc/cycle.rs:1390-1416).
The remembered-set finalize rebuild walks the ENTIRE heap (all arena objects + full malloc registry) every cycle (gc/cycle.rs:1244-1264, gc/verify.rs:279-349), and with require_marked=false for minors it re-dirties pages from unreachable-but-unswept old parents.
Old-page bookkeeping iterates every old 4 KB page meta up to 3× per minor (arena/page_meta.rs:555-571, gc/oldgen.rs:181-184,1199), plus the promotion-handoff pre-walk over all arena objects once survivor in-use ≥ 24 MB (gc/policy.rs:864-902).
Minor pause grows monotonically with process lifetime on servers.
Proposed fix
Restrict the minor sweep cursor to nursery+survivor regions; maintain old-gen accounting incrementally from promotion/reclaim events; per-block live counts so fully-dead block reset needs no per-object walk.
Problem
Minor GC cost includes several O(old-gen) components even when nothing old is touched:
gc/oldgen.rs:1181-1225cursor over all regions; flags/accounting rewritesgc/oldgen.rs:1291-1311,1338,1357; minors setreclaim_dead_old_blocks=falsebut still walk,gc/cycle.rs:1390-1416).gc/cycle.rs:1244-1264,gc/verify.rs:279-349), and withrequire_marked=falsefor minors it re-dirties pages from unreachable-but-unswept old parents.arena/page_meta.rs:555-571,gc/oldgen.rs:181-184,1199), plus the promotion-handoff pre-walk over all arena objects once survivor in-use ≥ 24 MB (gc/policy.rs:864-902).Minor pause grows monotonically with process lifetime on servers.
Proposed fix
rebuild_evacuated_old_to_young_remembered_set(gc/verify.rs:243-253) plus the CI: gc_write_barrier_stress red on main (missing old→young remembered-set edges → segfault) #5029 snapshot repair already exist for exactly this.Context
2026-07-09 GC audit (pause/scalability + barrier dimensions).