Repository navigation
rqe-optimizer: add AutoSketch's per-query configuration search as a baseline - #135
Merged
Merged
Conversation
Port of AutoSketch Algorithm 4 (LHS seeds, feasibility-directed neighbor search, pruning, stopping) from ASAPQuery-backend autosketch_comparison.rs, generalized to each sketch variant's measured parameter axes. Each RQE is searched independently and gets a dedicated x=S sliding deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 5, 2026
Merged
- Evaluate and expand each configuration once (EXAMINE rule 1); an evaluated configuration is never re-queued. - Seed the cheapest configuration only when LHS hits no measured point, as the comment already said. - Compare resources as (memory, insert CPU) instead of adding bytes and seconds. - Document the cross-variant search as an extension over the paper. - Test the single-axis stopping rule, the cross-variant choice, a higher-is-better floor and LHS distinctness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Oct 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Oct 5, 2026
Runner (examples/autosketch_vs_asap.rs) for the traces workloads of ProjectASAP/ASAPQuery#777: ASAP (joint MILP with one absolute latency SLA per sweep point), PerQuery-CostAware and AutoSketch-Adapted, scored by objectives::score and priced per EC2 family, with sanity checks. Accuracy now depends on the query's merge count m = S/x: a cost entry may carry "{metric}@m{b}" keys, eligibility reads the smallest measured b >= m, and a merge larger than every measured b is ineligible. Results for Alibaba 2022, Google 2011 and BOOM with figures and summary. The earlier example and scaling workloads are dropped (#777 §6). Rebased onto main, which now has #137, #135 and #136. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Oct 5, 2026
Alibaba 2022, Google 2011 and BOOM, every SLA, model A and model B per family, PerQuery bound by the SLA and AutoSketch with #135's final search. Sanity checks pass; the peak bound equals the simulated peak everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Before this PR
rqe-optimizerhad only the batch planner, brute-force enumeration and the HiGHS MILP, with no AutoSketch baseline to compare it against. The only port of AutoSketch's search (NSDI '24, Algorithm 4) was in ASAPQuery-backend (#547,data_plane/examples/autosketch_comparison.rs). It was hardcoded to a CMS width/depth grid.After this PR
rqe_optimizer::autosketchadds AutoSketch-Adapted: AutoSketch's configuration search, run once per RQE over the measured cost table. This is the AutoSketch baseline in the evaluation plan, ProjectASAP/ASAPQuery#777 (§3).search): Algorithm 4 for one RQE, over the measured configurations of every sketch variant that serves its capability.SCwith no ALU term.plan): gives each RQE its own deployment, never shared, even when two RQEs pick the same one, soobjectives::scorecharges ingest per RQE. The mapping is the identity. Latency is not considered.window_adapter): one sliding sketch per query. The window is the lookbackS; the slide is the repeat intervalT, orgcd(S, T)whenTdoes not divideS. A query reads one instance and never merges.How it maps to the paper
k, DDSketchalpha, HLLlg_k) gets one random seed, because the paper's rule would sample every value, which is exhaustive. The cheapest configuration is seeded only if no LHS point was measured.alpha(smaller means more memory) worksValidation
cargo test -p rqe-optimizer: 22 passed, including these 10 for this module:scorecharges ingest twice;T | Sand thegcdcase) passcandidates::is_eligible;cargo clippy -p rqe-optimizer --all-targets -- -D warningsandcargo fmt --check -p rqe-optimizerare clean.🤖 Generated with Claude Code