Skip to content

Stage 3 over execution contexts plans some workloads 3–37× slower than main: weak LP relaxation, little presolve (RangeHeavy L1 quantiles 0.21 s → 7.7 s) #1352

Open

Description

@zzylol

Example

The paper's RangeHeavy L1 quantiles component: 24 PromQL queries such as quantile_over_time(0.5, data[15m]), quantile_over_time(0.9, data[1h]) and quantile_over_time(0.9, data[15m]) / quantile_over_time(0.5, data[15m]), every 60 s, relative error 0.05 (δ = 0.01, whole result), over data (10,000 series, 2,000,000 rows/s, values non-negative), raw data kept, unit costs tools/dag-viewer/cost-inputs/aws-fargate-us-east-1.json:

asap_planner --workload quantiles.json --deployment-capabilities caps_raw.json \
  --cost-inputs aws-fargate-us-east-1.json --run-until stage3

Stage 3 planning time, release build, one thread, median of 5 runs (range):

Workload main (59365ce80) Stage 3 over execution contexts (#1237, 796d43503) MILP variables / rows, main → #1237
RangeHeavy L1 quantiles 0.21 s (0.13–0.59) 7.74 s (6.85–10.8), 37× 5,579 / 3,817 → 3,731 / 4,322
RangeHeavy-8users L1 quantiles 0.31 s 5.25 s, 17× 5,585 / 3,827 → 3,701 / 8,427
RollupHeavy-8users L1 http-p99 1.02 s 7.04 s, 7×
RollupHeavy L1 http-p99 2.08 s 5.38 s, 2.6×
tools/dag-viewer/workloads/random-mixed-seed-862/workload-03.json, default capabilities (defcaps-03) 2.83 s 32.0 s, 11×
defcaps-02 6.1 s 23.7 s
defcaps-01 5.2 s 8.6 s
random-mixed-seed-862-x5 workload-02, default capabilities 2.3 s 13.8 s

Both find the same optimum where they plan the same thing (defcaps-03: 230.4227/s on both). Other workloads are faster with #1237 (c16 29.8 → 10.4 s, c09 56.9 → 25.5 s, RollupHeavy L1 flows 5.6 → 0.85 s), so the slowdown is specific to some models, not general.

What should happen: Stage 3 over execution contexts should plan these workloads in about the time main takes.

Why it happens

The time goes to HiGHS's branch and bound, not to building the model (Stages 0–2, model construction and plan_cost take the same time on both trees, within ±0.2 s). From the HiGHS logs:

Not yet confirmed which rows cause the weak relaxation. The likely ones are the rows #1237 adds over execution contexts, which fractional $y$ satisfy cheaply:

Proposal

First find which rows weaken the root bound (drop or tighten one family at a time on the workloads above). Then try the following, measuring each. Any change must keep the optimum: the stage3_objective pins and the 197-workload cost comparison stay unchanged.

  1. Tighten (R) under fractional $y$, or state $h_v$ in units of the producer's output interval so the coefficients of (R) stay near 1.
  2. The aggregated θ linking row of [Performance] Stage 3: aggregated θ linking row for the sketch fan-out (c16 85.6 s → 2.5 s) #1296.
  3. The tighter greedy bound and the lower bound of [Performance] Stage 3: retention-aware greedy bound, and a lower bound that counts shared producers once #1297.

Scope and acceptance

In scope: Stage 3 MILP formulation tightness and presolve on the workloads above. Out of scope: Stages 0–2 and the cost model.

Done when, on the same host and build settings, each workload in the table plans within 2× of main (median of 5), with the same plan cost, and the stage3_objective tests and the 197-workload cost comparison are unchanged.

Status and related work

Activity

  1. added
    enhancementNew feature or request
    optimizerWorkload optimization and plan selection
    searchCandidate-plan search space and algorithms
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestoptimizerWorkload optimization and plan selectionsearchCandidate-plan search space and algorithms

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions