ci: the deploy gate measures what a cache hit still costs - #398
Merged
Conversation
A hit being fast never showed the cache was doing its job. Before the lookup moved ahead of the work, a repeat already answered in 0.85-1.90 s because hf-hub's disk cache had removed the network while the 39 MB header parse still ran. Any wall-clock assertion would have passed on the broken path. So measure the round trip to a route that does nothing and subtract it. What remains is server-side time, and the two paths are far apart there: pre-fix hit 0.76-1.81 s a full header reparse post-fix hit 0.15-0.25 s one ranged GET for the commit Measured on the box today, five samples each, against a 0.09-0.11 s floor read from /v1/health. The ceiling sits at 0.50 s, between them with room on both sides, and the pre-fix timings fail it while the post-fix ones pass. It is a deployment signature rather than a performance budget: the semantics are proven in CI, which counts probes, staging passes and planner invocations directly. This only answers whether the binary serving traffic is the one that does that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-through on the cache-before-work fix (#392): turn the observed separation into a gate.
A hit being fast never showed the cache was working. Before the lookup moved ahead of the
work, a repeat already answered in 0.85–1.90s because hf-hub's disk cache had removed the
network while the 39 MB header parse still ran. Any wall-clock assertion would have passed on
the broken path.
So the gate measures the round trip to a route that does nothing (
/v1/health) and subtractsit. What remains is server-side time:
/v1/healthCeiling at 0.50s, between them with margin either side.
Control
The same logic against real timings from both paths:
What it is and is not
A deployment signature, not a performance budget. The semantics are proven in CI by
a_cache_hit_stages_nothing_and_plans_nothing, which counts commit probes, staging passes andplanner invocations directly and fails when the old order is restored. This only answers
whether the binary serving traffic is the one that does that — which
VmHWMcannot, since itis cumulative and a retained arena can absorb a reparse without moving the high-water mark.
Verified against the live deployment: the full gate passes end to end.