Skip to content

perf: cap the cost stage at 3 s and log what it left on the table - #154

Merged
andig merged 1 commit into
rollup/two-stage-plus-130from
perf/cap-the-cost-stage
Sep 14, 2026
Merged

andig merged 1 commit into
rollup/two-stage-plus-130from
perf/cap-the-cost-stage

Conversation

@andig

@andig andig commented Sep 14, 2026

Copy link
Copy Markdown
Member

Follows up on the tie break reserve change in #143 and the continuity pass in #151, measured in production over 2026-09-05 to 2026-09-14.

The cost stage is anytime branch and bound and consumes whatever the reserve leaves of the limit. Since the reserve was sized to the tie break cap it gets 5.4 s of the 10 s limit, the tie break seats in the rest, and 17 percent of the split solves end past the limit. Split solves are 3 percent of the traffic and 38 percent of the CPU. Whether those seconds buy money has never been measured, so this caps the stage and logs what would show it.

  • COST_TIME_LIMIT 3 s caps the cost stage on a split. A split lands around 7.5 s instead of 10.2 s. Requests without a time limit stay uncapped.
  • The request log carries cost_stage_value and cost_stage_gap, the money the cost stage found and what CBC could not rule out above it, in currency, zero when proven. Parsed from CBC's own summary, the solution file has no bound.
  • Joint solves report no gap, the cost stage did not run.

🤖 Generated with Claude Code

The cost stage is anytime branch and bound and spends whatever the reserve leaves of the
limit. On the production 10 s limit that is 5.4 s, and with the tie break seated in the
rest, 17 percent of the split solves ended past the limit. An absolute cap of 3 s brings a
split to about 7.5 s. Whether the seconds past 3 bought money is unknown, so the request
log now carries the cost stage value and the gap CBC reported between its schedule and
its bound, in currency, zero when proven.
@andig
andig merged commit 8e2158c into rollup/two-stage-plus-130 Sep 14, 2026
@andig
andig deleted the perf/cap-the-cost-stage branch September 14, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant