Skip to content

Commit bcbe368

Browse files
zzylolclaude
andcommitted
docs(asap-tools): generate eval data on the fly in the paced feeder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 38f6f68 commit bcbe368

1 file changed

Lines changed: 24 additions & 13 deletions

File tree

‎asap-tools/experiments/DATA_PLANE_CLICKHOUSE_EVAL_PLAN.md‎

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ deferred (§10); for those, ClickHouse has no equivalent sketch.
5252
- θ = 1.1 (Zipf key weights) is fixed for the later frequency/top-k pass. It
5353
has no effect on the quantile-only pass, because every series emits at the
5454
same rate.
55-
- Generation is seeded. The ClickHouse and ASAPQuery feeders read the same
56-
JSONL file `{ts, label_0, instance, value}`.
55+
- The data is generated on the fly by the paced feeder
56+
([#793](https://github.com/ProjectASAP/ASAPQuery/pull/793)), with no dataset
57+
file. Each value is a hash of `(seed, series, sample index)`, so the ClickHouse
58+
and ASAPQuery feeders send identical data. A file would be about 9e8 rows
59+
(~50 GB) per workload at 1e6 series × 900 s.
5760

5861
### 3.2 Queries
5962

@@ -122,7 +125,7 @@ for another's MV maintenance.
122125
## 5. Pipeline per workload
123126

124127
```
125-
generator ──► data.jsonl + SQL files + planner input
128+
workload generator ──► SQL files + planner input + feeder flags (C, s, seed)
126129
│
127130
asap-planner --planner milp ──► streaming_config.yaml + inference_config.yaml (the plan)
128131
│
@@ -135,13 +138,20 @@ runner: one run per arm × trial, paced feeders, resource caps, monitors
135138
each aggregation's type, `parameters`, `labels.grouping`, `windowSizeMs` and
136139
`windowType`/slide. From it, the translator writes the MV DDL and the queries
137140
that read the MVs. Both systems therefore deploy one plan.
138-
- **Paced feeders.** There are two identical feeder processes, one per system
139-
under test, started on the same clock. Each one sends every second's rows:
140-
ASAPQuery receives them over Prometheus Remote Write, and ClickHouse via
141-
`INSERT … FORMAT JSONEachRow`. Each feeder runs on its own 2 cores, outside
142-
both caps. The existing bulk paths (JSON ingest, `_load_json_batched`) do not
143-
pace. `batch_delay_ms` in `json_ingest.rs` is a fixed sleep and is not
144-
exposed in `engine_config.rs`.
141+
- **Paced feeders** (`asap-tools/data-sources/paced-feeder`,
142+
[#793](https://github.com/ProjectASAP/ASAPQuery/pull/793)). There is one
143+
feeder process per system under test, both run with the same workload flags,
144+
and each runs on its own 2 cores outside the caps. Every second it sends that
145+
second's rows:
146+
- ASAPQuery gets them over Prometheus Remote Write (50k rows per request,
147+
under axum's 2 MB body limit);
148+
- ClickHouse gets them via `INSERT … FORMAT RowBinary` (100k rows per
149+
request), its efficient native path, just as Remote Write is ASAPQuery's.
150+
JSONEachRow would have charged ClickHouse for JSON parsing.
151+
152+
Measured pinned to 2 cores, both sinks hold 1e6 rows/s with no tick over
153+
1 s; the feeder uses 0.15 cores (ClickHouse) and 0.34 cores (Remote Write).
154+
The existing bulk paths (JSON ingest, `_load_json_batched`) do not pace.
145155
- **Runner.** It extends `experiment_run_clickhouse.py`:
146156
- one mode per arm;
147157
- a feeder-driven ingest phase in place of the bulk load;
@@ -199,14 +209,15 @@ It checks:
199209
- 0 fallbacks;
200210
- exact-MV results equal the reference exactly;
201211
- DD accuracy is within target on both sides;
202-
- the feeders hold 1e6 samples/s under the cap (workloads 3 and 4).
212+
- the systems absorb 1e6 samples/s under their caps (workloads 3 and 4). The
213+
feeders themselves are already shown to keep up at that rate.
203214

204215
## 8. Work items
205216

206217
| # | Item | Owner | Depends on |
207218
|---|---|---|---|
208-
| 1 | Data + workload generator: JSONL (Pareto a, `C`, `s`, 1 sample/s), SQL files, planner input | Zeying | — |
209-
| 2 | Paced feeder (Remote Write and ClickHouse INSERT, one per system) | Zeying | — |
219+
| 1 | Workload generator: SQL files, planner input and feeder flags per workload | Zeying | — |
220+
| 2 | Paced feeder with on-the-fly data generation (Remote Write and ClickHouse RowBinary) | Zeying | Draft PR #793 |
210221
| 3 | Translator: `streaming_config.yaml` → ClickHouse `init.sql` + per-arm SQL | Zeying | — |
211222
| 4 | Runner: per-arm modes, feeder ingest, caps, `system.parts` collection, `config/experiment_type/clickhouse.yaml` | Zeying | 2 |
212223
| 5 | Post-processing: ClickHouse and precompute paths in `compare_costs.py`, model A and model B pricing from the monitor timeline, figure | Zeying | 4 |

0 commit comments

Comments
 (0)