Ray's Knowledge Base
Unlock

The is_unique peak on the page heap does not come from large-tier rounding or decay

FactVerified 18 Oct 2026Holds project: dftracer-utils
Fact. A statement and the evidence for it.

Statement#

When column buffers use the page heap, dataframe/test_op_peak_memory fails for is_unique and is_duplicated. The cause is not the large tier (1 to 64 MiB) rounding to a power of two. The cause is also not the decay time. Do not start there again. Measure which size tier the op uses before you change the heap.

Evidence#

  • At commit 4d5cb7d6, with columns on std::aligned_alloc, the test passes: is_unique 29 MiB, is_duplicated 32 MiB.
  • With columns on the page heap: 40 to 46 MiB for both, against a bound of 40 MiB.
  • With DFTRACER_UTILS_MEMORY_BACKEND=system: 31 and 33 MiB.
  • The large tier was changed from std::bit_ceil to 8 classes per doubling (waste below 1/8). The peaks stayed at 41 to 46 MiB.
  • DFTRACER_UTILS_MEM_DECAY_MS=0 gave the same peaks.
  • The run-to-run noise is about 5 MiB. Run the report 3 times: DFTU_OP_PEAK_REPORT=1 DFTRACER_UTILS_MEMORY_BACKEND=page_heap build/build-tests/tests/dataframe/test_op_peak_memory -tc="each op*".

Also found by searching

  • is_unique holds 41 MiB above the streaming baseline; bound is 40 MiB at a 8 MiB budget
  • dataframe peak memory test fails on the page heap but passes on the system backend
  • why does moving column buffers onto the page heap raise peak RSS
  • page heap large tier power of two rounding peak RSS