Skip to content

perf(graph): bound retained Grafeo generation opens below cgroup memory budget #799

Description

@ScriptedAlchemy

Defect

A live Hotpath allocation run against PR #707's cgroup-aware/streaming binary (5de159b26) identified the dominant remaining memory cost: eager Grafeo generation opens.

Artifact: /fast/tmp/td-707-hotpath-alloc-report/hotpath-alloc.json
SHA-256: c3ec5d0dac658e4df19b7f446ff887a3a1ff3b454cde6de05ae00d780046ccc6

The alloc-bytes report recorded:

  • graph_db.generation.open.engine: 5 calls, 29.9 GB exclusive allocation total (~6 GB/open).
  • Total process allocation during the 688.56 s capture: 129.6 GB.
  • Retained graph census was approximately 6.884 GB per opened generation.
  • Live cgroup peak was approximately 27.9 GiB with ~13.3 GiB swap despite the cgroup-aware pressure mitigation.

The earlier interactive-catalog streaming fix removed one large duplicate materialization, but the live peak barely moved because multiple graph generations are still opened eagerly and retained concurrently.

Required outcome

  • Attribute every production owner responsible for the five generation opens and distinguish active serving, warming, recovery, stale, and retirement ownership.
  • Do not raise memory limits. Make non-serving generations lazy, hibernated, disk-backed, or otherwise bounded so retained graph owners fit under the effective cgroup budget.
  • Keep exact serving and generation identity truthful; no empty-success fallback and no eviction of a leased serving generation.
  • Add a scale test with multiple retained generations that asserts peak/retained bytes are bounded by the configured effective-memory ceiling.
  • Expose per-generation retained bytes and owner/lease blockers in runtime status so pressure decisions are falsifiable.
  • Re-run the same Hotpath allocation journey and show that graph_db.generation.open.engine no longer allocates roughly one full in-memory graph per retained generation and that RSS/swap stay below the cgroup high watermark during convergence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions