Skip to content

An upper-bounded ratio cannot be proved by an ablation that degrades both arms: #359's fetch-cache guard needs a separating mutation #795

Description

@OffgridwithJD

test/native_fetch_cache.sh's three cost guards now run in CI (#792) and assert through
check_ratio (#794). Both were mechanical conversions that deliberately left the bounds
alone. This is the question they deferred.

The bounds were calibrated when each side was a single reading, and a single reading carries
scheduling noise that #792 removed by taking the minimum of three. So the bounds are sized for a
spread that no longer exists.

Measured

Idle, from the check_ratio verdicts #794 now prints:

one/many     1.03x   bound  3x     headroom 2.9x
wide/small   1.04x   bound  5x     headroom 4.8x
over/under   1.22x   bound 12x     headroom 9.8x

Under six busy cores on an eight-core box, four runs after min-of-three:

one/many     0.84 – 0.93     bound  3
wide/small   0.98 – 1.00     bound  5
over/under   1.18 – 1.23     bound 12

Before min-of-three the same loaded fixture reached 2.39 on one/many, which is what those
bounds were absorbing. They are not absorbing it any more.

Why it is worth asking rather than obviously right to tighten

A guard whose bound sits three to ten times above its observed value will catch the regression it
was written for and very little else. over/under guards #359 with a bound of 12 against a
measurement of 1.2: a regression would have to make the over-cap projection ten times dearer
than the under-cap one before that check noticed, and #359 was about a cost that is
proportional rather than total — which is a much smaller effect than 10x.

But tightening is a behaviour change and needs its own calibration, not a guess:

That last one may be the real finding: a ratio of 1.00 means the fixture is no longer showing the
contrast it was built to show, and no choice of bound fixes that.

Not proposing a number

Deliberately. Picking one from today's headroom would repeat the mistake that produced the
current bounds — calibrating against the noise of the moment rather than against the defect. The
work is: for each of the three, decide from #353, #359 and the fetch-cache design what size of
regression must fail, check the fixture still produces a measurable contrast at that size, and set
the bound from that.


Filed by OffgridwithJD. Figures from pgcolumnar-audit, PG 18.4 assert build, idle and under six
busy cores; the loaded runs are the ones in #793.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions