Skip to content

[Subtask]: Make local file-page discard policy bounded and reuse-aware #30848

Open

Description

@aunjgr

Parent Issue

#30838

Detail of Subtask

Evidence reassessment — 2026-10-26

Current delivery/performance status: DIAGNOSIS/DESIGN OPEN. Retention has a measured benefit and a measured counterexample; no blanket policy is accepted.

Observed: An owned-only FADV_DONTNEED suppression probe changed SF100 Q6 4.005->2.135 s and reads 6.816->0 GiB, and Q21 21.326->10.675 s with fewer reads. Q1 instead changed 18.783->21.377 s with more reclaim despite fewer reads. Mixed baseline cache-charge ownership is a separate limitation.

Not yet established: A bounded retention policy that improves reuse without reclaim/retention losses across these workloads. Fewer physical reads alone do not establish lower total cost.

Next discriminating experiment: Reproduce positive and negative controls with attributable owned page charges, effective application caches, reclaim/pressure and complete query CPU/latency. Keep encoded file-page residency separate from decoded vector reuse.

Measured target: Mixed-I/O Q6/Q21 gains without the Q1 counterexample; full-suite memory/I-O/resource acceptance at the same cap.

Mandatory controls and total cost boundary: Q1, one-pass and low-reuse scans, pressure/reclaim, changing working sets, cancellation and bounded high-water release. No global cache drops or changes to unrelated processes.

Performance acceptance and rejection

  • Freeze current-main/candidate sources, executables, real caller shapes and effective settings. Use the unchanged qualification SQL and complete result consumption; exclude cold runs and keep profiles separate from latency scoring.
  • Demonstrate the named work/CPU reduction and an attributable uninstrumented target-query improvement. Include the controls below and full Q1-Q22 comparison; component wins, source changes, functional tests, SCA, merging and profile percentages are separate evidence.
  • A confirmed affected/control slowdown fails; unresolved slower signals are inconclusive. Confirm with an independent longer balanced run. No gain elsewhere, favorable average or self-approved tolerance waives a regression.
  • Complete applicable SF10/SF100 and memory/mixed-I/O acceptance before issue closure under the umbrella protocol. Report uncertainty, absolute CPU/instructions/work, allocations/copies and the same whole-application budget, effective cache, I/O/spill/swap/pressure evidence. Benchmark scripts do not verify input/table/schema/row counts/reference results/checksums.

Semantics and lifecycle requirements retained

  • The design explains when pages are retained/discarded, who owns the budget and how pressure/failure returns to bounded behavior.
  • Owned-page before/after experiments reproduce the Q6/Q21 benefit direction without the Q1 reclaim regression under the same application cap.
  • Report physical reads, CPU, reclaim, peak memory, spills and warmed latency; include one-pass scans and low-reuse controls.
  • No global drop-caches, changes to unrelated processes, unbounded retention or assumption that a warm query is already disk-free.

Describe implementation you've considered

Compare current discard, bounded reuse-aware retention and pressure-driven release. Account for duplicate encoded/decoded residency and workspace. Preserve a cheap one-pass/pressure route rather than disabling discard globally.

Coordination: Coordinate total memory with #30849; a file-page policy is not a decoded-cache admission fix.

Additional information

Pinned implementation / plan references

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. added
    severity/s0
    on Oct 22, 2026
  3. assigned and unassigned on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/subtaskseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions