Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
cc06632
Add sliding-window RQE deployment optimizer (ProjectASAP/sketch-bench…
milindsrivastava1997 Oct 4, 2026
6396499
rqe-optimizer: price plans per EC2 machine family (ProjectASAP/sketch…
zzylol Oct 5, 2026
c243b0d
rqe-optimizer: add AutoSketch's per-query configuration search as a b…
zzylol Oct 5, 2026
cb34613
Export the AutoSketch vs ASAP evaluation table from saturation curves…
zzylol Oct 5, 2026
b1c19a4
rqe-optimizer: exact sum/min-max/increase accumulators, CountSketch+h…
milindsrivastava1997 Oct 6, 2026
125b3a1
rqe-optimizer: per-phase cost model, workload facts, weighted AUCCost…
milindsrivastava1997 Oct 6, 2026
385c149
refactor(rqe-optimizer): Raqe input model in ms, spatial filter, per-…
milindsrivastava1997 Oct 6, 2026
ae0f8bb
rqe-optimizer: cost-table directory as input to export script and sma…
milindsrivastava1997 Oct 6, 2026
5d48327
rqe-optimizer: small_problem rejects unknown arguments (ProjectASAP/s…
milindsrivastava1997 Oct 6, 2026
7908fe9
rqe cost export: count top-k heaps, repeat top-k queries, add exact h…
zzylol Oct 6, 2026
ba77947
rqe-optimizer: size DDSketch memory from the metric's value range (Pr…
zzylol Oct 6, 2026
c9938e4
atomic-costs: record the measurement conditions on each cost-table ro…
zzylol Oct 6, 2026
e5b5c9a
rqe-optimizer: check accuracy at the query's merge count (ProjectASAP…
zzylol Oct 6, 2026
798648f
feat(rqe-optimizer): family properties, shared fixed-size sketches an…
milindsrivastava1997 Oct 7, 2026
4ea3d79
rqe-optimizer: split SumOrCount and TopK; deny unknown AtomicCostEntr…
milindsrivastava1997 Oct 7, 2026
e840e2b
feat(rqe-optimizer): plan output with active deployments and instance…
milindsrivastava1997 Oct 7, 2026
fe0d0c6
rqe-optimizer: drop hydra-kll from Quantile candidates (ProjectASAP/s…
milindsrivastava1997 Oct 7, 2026
07c2a2d
rqe-optimizer: read sketch accuracy from saturation curves (ProjectAS…
milindsrivastava1997 Oct 7, 2026
9ab3a3c
rqe-optimizer: check each family by its own accuracy metric (ProjectA…
milindsrivastava1997 Oct 7, 2026
11ae25a
rqe-optimizer: one study for sketch cost and accuracy (ProjectASAP/sk…
zzylol Oct 7, 2026
973bb43
rqe-optimizer: merged KLL and top-k answers read the merge curves (Pr…
zzylol Oct 7, 2026
3c60b91
rqe-optimizer: fall back to each sketch's guarantee where the study m…
zzylol Oct 7, 2026
8a35c80
top-k: heap = m·k per deployment; heap a runtime knob; seed-mean cost…
zzylol Oct 7, 2026
7412d93
study_saturation: the cost shape as a full grid row and column; refus…
zzylol Oct 7, 2026
840789c
top-k: k is a per-query variable (ProjectASAP/sketch-bench#185)
zzylol Oct 7, 2026
3bb0342
rqe-optimizer: workload_scenarios example (lookback/interval, groupin…
milindsrivastava1997 Oct 9, 2026
a09b8db
rqe-optimizer: MILP on cost by use, with batch latency (reported, or …
zzylol Oct 9, 2026
e8a585c
eval: AutoSketch vs. ASAP on the synthetic mixed set (cost by use; fr…
zzylol Oct 9, 2026
373ba82
rqe-optimizer: let mergeable finer-group deployments serve coarser RA…
milindsrivastava1997 Oct 10, 2026
a55c055
docs: end-to-end planning flow from traces to an rqe-optimizer plan (…
zzylol Oct 11, 2026
c2948ad
docs: Hydra admission design (accuracy, cost, candidates, sketch-benc…
zzylol Oct 11, 2026
037953e
eval: commit the AutoSketch-vs-ASAP accuracy curves (ProjectASAP/sket…
zzylol Oct 11, 2026
8371601
study: --phase hydra on the eval's datasets; Hydra cost rows (Project…
zzylol Oct 11, 2026
cdcb55e
eval: multi-grouping anomaly-detection templates (http, flows) for Hy…
zzylol Oct 11, 2026
b3831c4
rqe-optimizer: admit Hydra (HLL, UnivMon cardinality, KLL) as candida…
zzylol Oct 11, 2026
6698586
eval: AutoSketch vs. ASAP with Hydra candidates and a roll-up ablatio…
zzylol Oct 11, 2026
d6959cc
docs: rqe-optimizer README, how to read and use its data and results …
zzylol Oct 11, 2026
9ae4e4d
eval: PromQL and metrics for end-to-end runs in classic tables (Proje…
milindsrivastava1997 Oct 11, 2026
f86f5d2
docs(rqe-optimizer): a deployment slides when slide_secs < window_sec…
milindsrivastava1997 Oct 14, 2026
2bb3c8a
eval: e2e block for multi-grouping and all tables (ProjectASAP/sketch…
zzylol Oct 14, 2026
f37f978
eval: drop classic templates 7 and 9 (rates by job, top-k by rate) (P…
zzylol Oct 14, 2026
de293df
eval: §6.3 workloads re-planned at 10 samples/s for the end-to-end ru…
zzylol Oct 14, 2026
8e4d8b0
eval: accuracy target sweep (90%, 95%, 99%) (ProjectASAP/sketch-bench…
zzylol Oct 14, 2026
cf77de5
study: denser KLL/DDSketch grid and Hydra W 65536; §6.3 rerun (Projec…
zzylol Oct 14, 2026
ea56b4e
eval: instant RQEs read one scrape, not 1 s (ProjectASAP/sketch-bench…
milindsrivastava1997 Oct 14, 2026
f8f0f90
eval: one RQE per schema query, the strictest template's (ProjectASAP…
milindsrivastava1997 Oct 14, 2026
fba629f
eval: e2e 10/s plans with one-scrape instant RQEs and one RQE per que…
milindsrivastava1997 Oct 14, 2026
b26f75e
eval: RQE expression trees in e2e tables (ProjectASAP/sketch-bench#225)
milindsrivastava1997 Oct 15, 2026
0dda3eb
eval: §6.3 rerun with one-scrape instant RQEs (ProjectASAP/sketch-ben…
milindsrivastava1997 Oct 26, 2026
1190ff3
eval: §6.3.1 case studies swept one knob at a time (ProjectASAP/sketc…
milindsrivastava1997 Oct 26, 2026
ecb8b38
eval: §6.3 instant-RQE rerun on CloudLab (planning times from one nod…
zzylol Oct 26, 2026
8a1d6c6
eval: case-study sweep rerun with both weight settings (CPU and Farga…
zzylol Oct 26, 2026
ec5a0ca
refactor(rqe-optimizer): import rqe-optimizer from sketch-bench with …
milindsrivastava1997 Oct 26, 2026
f607fb6
refactor(rqe-optimizer): build rqe-optimizer in the workspace; planne…
milindsrivastava1997 Oct 26, 2026
8765554
style(rqe-optimizer): pass ASAPQuery's pre-commit hooks
milindsrivastava1997 Oct 26, 2026
ae99e86
docs(rqe-optimizer): point moved references at their new homes
milindsrivastava1997 Oct 26, 2026
80c2cef
docs(planner): rqe-optimizer is in this repo now
milindsrivastava1997 Oct 26, 2026
50f0071
fix(rqe-optimizer): build it in Docker and CI, fix stale references
milindsrivastava1997 Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
target/
.git/
rqe-optimizer/results/
rqe-optimizer/data/
2 changes: 2 additions & 0 deletions .github/workflows/accuracy_performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
paths:
- 'asap-query-engine/**'
- 'asap-planner-rs/**'
- 'rqe-optimizer/Cargo.toml'
- 'rqe-optimizer/src/**'
- 'asap-quickstart/**'
- '.github/workflows/accuracy_performance.yml'
- 'benchmarks/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
paths:
- 'asap-common/installation/**'
- 'asap-planner-rs/**'
- 'rqe-optimizer/Cargo.toml'
- 'rqe-optimizer/src/**'
- 'asap-query-engine/**'
- 'asap-tools/queriers/prometheus-client/**'
- 'asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- 'asap-query-engine/**'
- 'asap-planner-rs/**'
- 'rqe-optimizer/**'
- 'asap-common/dependencies/rs/**'
- 'asap-common/tests/**'
- 'asap-common/sketch-core/**'
Expand All @@ -18,6 +19,7 @@ on:
paths:
- 'asap-query-engine/**'
- 'asap-planner-rs/**'
- 'rqe-optimizer/**'
- 'asap-common/dependencies/rs/**'
- 'asap-common/tests/**'
- 'asap-common/sketch-core/**'
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
# rqe-optimizer's committed eval results (result JSON up to ~2 MB).
exclude: ^rqe-optimizer/results/
- id: check-case-conflict
- id: check-merge-conflict
- id: check-executables-have-shebangs
Expand Down
7 changes: 3 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"asap-common/tests/compare_patterns",
"asap-query-engine",
"asap-planner-rs",
"rqe-optimizer",
]

[workspace.package]
Expand Down
2 changes: 1 addition & 1 deletion asap-planner-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ chrono.workspace = true
promql-parser = "0.5.0"
reqwest = { version = "0.11", features = ["blocking", "json"] }
flate2 = "1.1"
rqe-optimizer = { git = "https://github.com/ProjectASAP/sketch-bench", branch = "main" }
rqe-optimizer = { path = "../rqe-optimizer" }

[dev-dependencies]
tempfile = "3.20"
Expand Down
2 changes: 2 additions & 0 deletions asap-planner-rs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ COPY Cargo.toml ./
COPY Cargo.lock ./
COPY asap-query-engine/Cargo.toml ./asap-query-engine/
COPY asap-planner-rs/Cargo.toml ./asap-planner-rs/
COPY rqe-optimizer/Cargo.toml ./rqe-optimizer/
COPY rqe-optimizer/src ./rqe-optimizer/src

# Create dummy source files so Cargo can resolve all workspace members
RUN mkdir -p asap-query-engine/src && echo "fn main() {}" > asap-query-engine/src/main.rs && \
Expand Down
8 changes: 4 additions & 4 deletions asap-planner-rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ struct Args {
#[arg(long = "clickhouse-database", required = false)]
clickhouse_database: Option<String>,

/// `milp` plans with sketch-bench's rqe-optimizer: PromQL or SQL with
/// `milp` plans with rqe-optimizer's MILP: PromQL or SQL with
/// --input_config only, labels from its `metrics:` hints or tables'
/// `metadata_columns`. `saved` writes a PromQL or SQL plan sketch-bench's
/// `metadata_columns`. `saved` writes a PromQL or SQL plan rqe-optimizer's
/// `autosketch_vs_asap` already solved.
#[arg(long, value_enum, default_value = "legacy")]
planner: PlannerArg,

/// Saved only. sketch-bench `autosketch_vs_asap` plan file
/// Saved only. rqe-optimizer `autosketch_vs_asap` plan file
/// (`<table>.plans.json.gz`).
#[arg(long, required_if_eq("planner", "saved"))]
plan: Option<PathBuf>,
Expand Down Expand Up @@ -152,7 +152,7 @@ fn main() -> anyhow::Result<()> {

if args.planner == PlannerArg::Milp {
anyhow::bail!(
"--planner milp is temporarily disabled; use --planner saved for sketch-bench eval plans"
"--planner milp is temporarily disabled; use --planner saved for rqe-optimizer eval plans"
);
}

Expand Down
6 changes: 3 additions & 3 deletions asap-planner-rs/src/optimizer/milp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Plans a workload with sketch-bench's rqe-optimizer MILP: converts the
//! Plans a workload with rqe-optimizer's MILP: converts the
//! workload config into `Raqe`s and solves for the cheapest deployments.

use promql_utilities::query_logics::enums::Statistic;
Expand Down Expand Up @@ -74,7 +74,7 @@ pub enum MilpError {
Solver(String),
}

/// The cheapest plan. Only families in sketch-bench's `DEPLOYABLE_FAMILIES`
/// The cheapest plan. Only families in rqe-optimizer's `DEPLOYABLE_FAMILIES`
/// are candidates unless `allow_undeployable_families`, whose plan can be
/// studied but not deployed. `accuracy` is what a deployment achieves for a
/// Raqe: in production sketch-bench's saturation curves
Expand Down Expand Up @@ -503,7 +503,7 @@ fn item_to_raqe(item: &OptimizerItem) -> Result<Raqe, MilpError> {
// the Raqe has no field for those labels, so it is priced from the
// bucket grouping's shape. Key count is bounded by the series count, but
// accuracy curves measured per series may not match summed values; needs
// key labels in sketch-bench's Raqe.
// key labels in rqe-optimizer's Raqe.
let grouping_labels: LabelSet = match capability {
Capability::TopKByValue | Capability::TopKByCount => req
.topk_by_labels
Expand Down
4 changes: 2 additions & 2 deletions asap-planner-rs/src/optimizer/saved_plan.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Writes a plan solved elsewhere, sketch-bench `autosketch_vs_asap`'s plan
//! Writes a plan solved elsewhere, rqe-optimizer `autosketch_vs_asap`'s plan
//! file, as the planner's streaming and inference YAML, without re-solving.
//! The workload comes from the eval table's `e2e` block: its PromQL or SQL
//! queries, the plan RQEs each reads, and the metrics' labels. A query's RQE
Expand Down Expand Up @@ -690,7 +690,7 @@ fn whole_ms(secs: f64) -> anyhow::Result<u64> {
Ok(ms.round() as u64)
}

/// The rules of sketch-bench's `is_eligible` that need no workload facts or
/// The rules of rqe-optimizer's `is_eligible` that need no workload facts or
/// accuracy: a pick that breaks them belongs to another workload table.
/// Grouping is left to the converter's roll-up check.
fn can_serve(r: &Raqe, d: &Deployment) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion asap-planner-rs/tests/saved_plan_e2e_tables.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! `--planner saved` on real sketch-bench eval tables and their saved plans:
//! the `all` workload of sketch-bench's `rqe-optimizer/results/e2e-rate10`,
//! the `all` workload of `rqe-optimizer/results/e2e-rate10`,
//! whose e2e queries carry RQE trees (all but its `rate` queries), and a
//! pilot random workload, `seed-862/workload-01-pilot`, whose top-k queries
//! are `topk by (region, service)`.
Expand Down
2 changes: 2 additions & 0 deletions asap-query-engine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ COPY Cargo.toml ./
COPY Cargo.lock ./
COPY asap-query-engine/Cargo.toml ./asap-query-engine/
COPY asap-planner-rs/Cargo.toml ./asap-planner-rs/
COPY rqe-optimizer/Cargo.toml ./rqe-optimizer/
COPY rqe-optimizer/src ./rqe-optimizer/src

# Create dummy source files so Cargo can resolve all workspace members
# All explicit [[bin]] targets in Cargo.toml must have stubs here for the dependency cache layer
Expand Down
13 changes: 13 additions & 0 deletions rqe-optimizer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "rqe-optimizer"
version.workspace = true
edition.workspace = true
license = "MIT"
description = "v1 brute-force solver for the RQE -> sketch-deployment mapping problem (docs/rqe_sketch_deployment_v1.md). Consumes aqpbm-core's AtomicCostEntry directly so a real atomic-cost export can be dropped in later without a translation layer."

[dependencies]
# The atomic-cost table's row types: sketch-bench measures and exports the table.
aqpbm-core = { git = "https://github.com/ProjectASAP/sketch-bench", rev = "c750fa6ed6cf742810b2339c89057612dfa39c86", default-features = false }
serde_json.workspace = true
good_lp = { version = "1.15", default-features = false, features = ["highs"] }
csv = "1"
Loading
Loading