Skip to content

System runner: plan the supported queries together before one instance per query - #288

Merged
GordonYuanyc merged 1 commit into
mainfrom
plan-supported-queries-together
Dec 4, 2026
Merged

GordonYuanyc merged 1 commit into
mainfrom
plan-supported-queries-together

Conversation

@GordonYuanyc

Copy link
Copy Markdown
Collaborator

When ASAPQuery-backend's control_plane cannot plan all of a spec's queries together (one unsupported query is enough), plan_groups planned every query alone and the runner started one data plane per query, each written the whole dataset. VictoriaMetrics answers all queries on one instance, so the backend's ingest CPU and memory were counted once per query.

Change

plan_groups in scripts/use_cases/run_use_case_on_systems.py:

  1. Plan all queries together (as before).
  2. If that fails, plan each query alone (as before) to find the supported ones.
  3. New: plan the supported queries together once more; if that plans, they run on one instance.
  4. Only if step 3 fails, or takes longer than --joint-plan-timeout (default 1800 s), fall back to one instance per query.

Planning together runs under the time limit; a timeout is reported as the reason and counted as planner timeouts in the planner summary.

Checks

  • scripts/use_cases tests, with new cases: supported queries planned together, falling back when they do not plan together or take too long, and no second joint attempt on the same set.
  • Use case 3 (noraw-ignore-eps0.01, one trial), ASAPQuery-backend 8263b22b, VictoriaMetrics v1.154.1: "5 of 6 queries plan; they plan together, one instance". Before, the same arm ran 5 instances.
ASAPQuery-backend, use case 3 before (5 instances, #286 numbers) after (1 instance)
peak resident (sum of instances) 305 MB 77 MB
ingest CPU 19.5 s 10.4 s
query CPU 5.7 s 5.6 s
max relative error 9.99% 9.99%

🤖 Generated with Claude Code

…e per query

When ASAPQuery-backend's control_plane cannot plan all of a spec's queries
together, the runner planned each query alone and ran one data plane per
query, each written the whole dataset. Now, after finding which queries plan
alone, it plans those together once more and runs them on one instance; only
if that fails, or takes longer than --joint-plan-timeout (default 1800 s),
does it fall back to one instance per query. Planning with a time limit
records the timeout in the planner summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GordonYuanyc
GordonYuanyc merged commit ec9175b into main Dec 4, 2026
2 checks passed
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