mgradwohl / mgradwohl/tasksmack

[Perf][Tooling] MemoryTracker's dormant allocation tracking measures the wrong thing

Open
#879 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance testing tooling
Dominant language
C++
Stars
1
Forks
0
Avg merge
3h 4m
Merged PRs (30d)
115

Description

Problem

MemoryTracker.h uses Linux RSS (resident set size) as its memory signal; its allocation
manager registration is dormant/unused, and its max_bytes_used field accumulates total bytes
allocated over time rather than tracking peak live (currently-allocated) bytes. RSS is not
evidence of reduced allocation churn -- a change that reduces allocation count/rate can leave RSS
unchanged, and vice versa.

Recommendation

Separate RSS/working-set/private-byte telemetry (what the OS reports) from actual allocation
count, total bytes allocated, and peak live allocated bytes (what the allocator itself would
report if properly hooked up). Fix max_bytes_used's semantics (peak live, not cumulative) before
enabling/relying on the dormant tracker for any performance claim.

Acceptance criteria

  • MemoryTracker's allocation-count/bytes-allocated metrics are distinct from RSS/working-set
    metrics in its reporting.
  • max_bytes_used (or its corrected equivalent) reports peak live allocation, not a cumulative
    total.

Additional Context

From #843's Phase 0 tooling-trust review addendum ("Concrete performance-tooling work" table,
MemoryTracker row).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading MemoryTracker.h and the allocation-manager registration and reporting paths it contains. Review the MemoryTracker row in #843's Phase 0 tooling-trust addendum for context. The work is done when allocation count, total allocated bytes, peak live bytes, and RSS or working-set metrics are reported distinctly, with max_bytes_used representing peak live allocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.