Skip to content

perf: inspect runtime overhead against sketch and raw exact computation - #766

Open
zzylol wants to merge 1 commit into
refactor/query-plan-dag-executionfrom
perf/issue-758
Open

zzylol wants to merge 1 commit into
refactor/query-plan-dag-executionfrom
perf/issue-758

Conversation

@zzylol

@zzylol zzylol commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Dependency stack: main → #768 → #737 → #749 → #771 → #728 → #770 → #763 → #765 → #761 → #742 → #759

Independent follow-ups to #765: #756 (diagnostics), #766 (runtime controls and overhead inspection).

Refs #758. Stacked directly on #765 as an independent tooling PR. It does not depend on #742, and #761/#759 do not depend on it.

Why and behavior

Before this PR: runtime workers followed implicit Tokio defaults, console/file logging could not be disabled independently, and there was no controlled comparison between direct computation, backend execution and HTTP query handling.

After this PR: --runtime-workers 2 --runtime-max-blocking-threads 8 --log-level off --disable-console-log --disable-file-log controls the production runtime and logging while retaining configuration artifacts. A Rust inspection executable scans server workers and client concurrency against direct DDSketch and raw exact median baselines, the real installed-plan query engine, and the real HTTP service. Every layer uses the same deterministic observations; forwarding is disabled and results must agree before measurements count as successful.

Reports retain p50/p95/p99 and samples, throughput, failed/dropped requests, process/driver CPU, RSS/peak RSS, observed threads, effective logging and visible cgroup limits. Fixed-rate arrivals include scheduling delay and count overload drops; closed-loop concurrency is also supported. Direct synchronous kernel timing is reported separately from task-dispatch latency. Each matrix cell uses a fresh process, with configurable warmup/repeats and JSON/CSV output.

The developer guide documents the shared runtime/task model, measurement boundaries, log comparisons and profiling commands. CI checks correctness and a small matrix, without imposing performance thresholds on shared runners.

Validation and limits

  • Two runtime-control tests and four benchmark tests pass, including real backend/HTTP agreement with the direct sketch on one- and two-worker runtimes.
  • A 16-cell functional matrix (four layers × two worker counts × two concurrency levels) completes 320 queries successfully; disabled sinks create no log files.
  • Fixed-rate overload correctly records 1 completed / 99 dropped requests and passed=false. RUST_LOG precedence is verified.
  • Production binary check, targeted Clippy with -D warnings, formatting and diff checks pass.
  • Measurements above are debug-build functional validation, not performance results. No release speedup or eight-thread crossover is claimed. CPU profiling was not performed on this host (perf is unavailable).
  • The initial fixture is one series, one complete pane and a DDSketch median. It excludes ongoing ingestion/maintenance and does not establish behavior for every sketch family or query shape. Memory includes the fixture, client and report buffers; process CPU minus driver CPU includes auxiliary threads.

Shared physical operator stack update

The shared runtime, operators and sketch codec are owned by ASAPPlanner #462, built on Planner #461. Backend #770 consumes them, #763 integrates ingestion and #765 integrates queries. The stack uses general semi-join and grouped Sort → Limit, with execution phase on the node. Independent library tests run in Planner; deployment acceptance stays in this backend stack.

Scope verification

The reorganized #759 and independent #766 trees pass strict workspace/all-target Clippy. Shared Rust runner tests pass. This does not resolve the existing #754 plan-shape gates or establish live performance benefit.

@zzylol
zzylol force-pushed the 732-test-add-prometheus-remote-write-promql-differential-suite branch from 9c84758 to 00195cb Compare September 24, 2026 12:56
@zzylol
zzylol changed the base branch from 732-test-add-prometheus-remote-write-promql-differential-suite to refactor/query-plan-dag-execution September 24, 2026 12:57
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