All papers
OOPSLA '23 · 2023

MemPerf: Profiling Allocator-Induced Performance Slowdowns

Jin Zhou, Sam Silvestro, Steven (Jiaxun) Tang, Hanmei Yang, Hongyu Liu, Guangming Zeng, Bo Wu, Cong Liu, Tongping Liu

ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsCPU and GPU Memory AnalysisFeeds XScope

In one paragraph

The memory allocator affects performance far beyond malloc and free: where it places objects decides cache and TLB behavior for every later access. No existing profiler could say that a slowdown comes from the allocator, so programmers optimize the wrong code. MemPerf identifies allocator-induced slowdowns without comparing against another allocator. It follows the whole life cycle of heap objects: a thread-aware, type-aware model estimates the cost of management operations, and a top-down method with hardware performance counters attributes slow memory accesses (cache misses, TLB misses, false sharing) to allocator decisions. It caught 98% of medium and large slowdowns with no false positives and exposed design issues in widely used allocators.

Key ideas

  • Life-cycle based detection: an allocator can slow a program at allocation and deallocation time and at every access to the objects it placed, so both are measured separately.
  • A thread-aware, type-aware performance model that predicts the slowdown of management operations against an oracle allocator, with no second run needed.
  • Top-down attribution of slow memory accesses, using performance counters and lightweight sampling to measure allocator-induced cache and TLB misses correctly.
  • Low interference: locks and relevant system calls are sampled at 1%, so the profiler is usable in deployment.

Results

  • Reported 110 of 112 allocator-induced slowdowns above 5% (98.2%), with no false positives.
  • About 7.5% profiling overhead (geometric mean), against 20% for perf, 56% for Feather, and 171% for CCProf in the same study.
  • Pinpointed multiple known and previously unknown design issues in widely used allocators.

Why it matters for Teyon

XScope applies the same philosophy to GPU memory: explain why memory behaves the way it does and attribute it to the tensor and the source line that caused it, instead of reporting a number.

Read the original

This page is our summary. The paper itself, peer-reviewed at OOPSLA '23, is the source of every number above.