Skip to content

Commit 2f47fd9

Browse files
fix(asap-tools): support Google cluster-data experiments
1 parent 9fb051a commit 2f47fd9

4 files changed

Lines changed: 94 additions & 2 deletions

File tree

‎asap-tools/experiments/config/config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ query_engine:
9898

9999
# Controller configuration
100100
controller:
101-
punting: ??? # REQUIRED: Enable query punting based on performance heuristics (should_be_performant check)
101+
punting: false # Enable query punting based on performance heuristics (should_be_performant check)
102102

103103
# Optional manual planner windowing override. Omit this block to preserve the
104104
# default tumbling-window behavior. For tumbling windows, omit

‎asap-tools/experiments/config/experiment_type/cluster_data_google.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ experiment:
99
- mode: baseline
1010
server: prometheus
1111

12+
# Monitoring tool configuration
13+
monitoring:
14+
tool: prometheus
15+
deployment_mode: bare_metal
16+
1217
servers:
1318
- name: prometheus
1419
url: http://localhost:9090
@@ -34,6 +39,9 @@ exporters:
3439
#parts_mode: "all-parts" # or "part-index" with part_index: 0
3540
parts_mode: "part-index" # or "part-index" with part_index: 0
3641
part_index: 0
42+
# A Google task_usage scrape contains many active task series.
43+
scrape_interval: "60s"
44+
scrape_timeout: "30s"
3745
# Optional configuration
3846
# log_level: "INFO" # DEBUG, INFO, WARN, ERROR (default: INFO)
3947
# memory_limit: "2g"

‎asap-tools/experiments/generate_prometheus_config.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,17 @@ def main(args, experiment_config=None):
282282

283283
scrape_config = {
284284
"job_name": "cluster_data_exporter",
285-
"scrape_interval": "10s", # Fast scrape interval for high-resolution cluster data
285+
"scrape_interval": cde_config.get("scrape_interval", "10s"),
286286
"static_configs": [
287287
{
288288
"targets": [target],
289289
}
290290
],
291291
}
292292

293+
if "scrape_timeout" in cde_config:
294+
scrape_config["scrape_timeout"] = cde_config["scrape_timeout"]
295+
293296
# Add metric_relabel_configs to only keep required metrics
294297
add_metric_relabel_configs(
295298
scrape_config, "cluster_data_exporter", experiment_config

‎docs/03-how-to-guides/operations/run-alibaba-cluster-data-experiment.md‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,87 @@ python3 experiment_run_e2e.py \
109109
The default run takes about three minutes and tears down the services when
110110
it finishes. Use `flow.no_teardown=true` only when debugging service state.
111111

112+
## Run a Google Cluster-Data Experiment
113+
114+
The Google trace is already split into compressed `task_usage` parts, so no
115+
preprocessing is required. The benchmark data is under:
116+
117+
```text
118+
../../benchmarks/metrics_observability/data/google-cluster-data/ClusterData2011/clusterdata-2011-2/task_usage
119+
```
120+
121+
The checked-in Google configuration uses `part_index: 0`, which is useful for
122+
a one-node experiment. The first part is approximately 92 MB compressed and
123+
381 MB uncompressed. Copy it to node19:
124+
125+
```bash
126+
GOOGLE_DATA="$PWD/../../benchmarks/metrics_observability/data/google-cluster-data/ClusterData2011/clusterdata-2011-2/task_usage"
127+
CDE_HOST="node19.scratch2.cloudmigration-PG0.utah.cloudlab.us"
128+
129+
ssh -o StrictHostKeyChecking=no "milindsr@$CDE_HOST" \
130+
'mkdir -p /scratch/sketch_db_for_prometheus/cluster_traces'
131+
132+
rsync -ah --info=progress2 -e 'ssh -o StrictHostKeyChecking=no' \
133+
"$GOOGLE_DATA/part-00000-of-00500.csv.gz" \
134+
"milindsr@$CDE_HOST:/scratch/sketch_db_for_prometheus/cluster_traces/"
135+
```
136+
137+
Build the same exporter image used for Alibaba if it is not already present:
138+
139+
```bash
140+
ssh -o StrictHostKeyChecking=no "milindsr@$CDE_HOST" \
141+
'cd /scratch/sketch_db_for_prometheus/code/asap-tools/data-sources/prometheus-exporters/cluster_data_exporter &&
142+
bash installation/install.sh'
143+
```
144+
145+
Run the Google experiment from `asap-tools/experiments`:
146+
147+
```bash
148+
python3 experiment_run_e2e.py \
149+
experiment.name=google_cluster_data_offset18 \
150+
experiment_type=cluster_data_google \
151+
providers.cloudlab.username=milindsr \
152+
providers.cloudlab.hostname_suffix=scratch2.cloudmigration-PG0.utah.cloudlab.us \
153+
providers.cloudlab.node_offset=18 \
154+
providers.cloudlab.num_nodes=1 \
155+
cluster_data_directory=/scratch/sketch_db_for_prometheus/cluster_traces
156+
```
157+
158+
This configuration runs both `sketchdb` and `baseline` modes. Google
159+
`task_usage` produces a much larger `/metrics` response than the Alibaba
160+
Node trace, so the Google config sets the cluster-data scrape interval to
161+
60 seconds and timeout to 30 seconds. The Prometheus config generator honors
162+
these optional exporter settings; Alibaba retains its 10-second default.
163+
164+
The default query is:
165+
166+
```promql
167+
quantile by () (0.5, google_mean_cpu_usage_rate_0)
168+
```
169+
170+
For Google data, the exporter labels are `job_id`, `task_index`, and
171+
`machine_id` (along with the scrape-added `instance` and `job` labels). To
172+
change the aggregate column, use the corresponding metric name and update
173+
the `metrics` entry in
174+
`asap-tools/experiments/config/experiment_type/cluster_data_google.yaml`.
175+
For example, `canonical-memory-usage` becomes
176+
`google_canonical_memory_usage_0`. To group the result by a data label, change
177+
`by ()` to e.g. `by (machine_id)` and include that label in the `metrics`
178+
entry's label list.
179+
180+
Because Google has separate baseline and sketchdb modes, the latency wrapper
181+
can be used after the run:
182+
183+
```bash
184+
cd /home/milind/Desktop/cmu/research/sketch_db_for_prometheus/code/ASAPQuery/asap-tools/experiments/post_experiment
185+
PYTHONPATH=/home/milind/Desktop/cmu/research/sketch_db_for_prometheus/code/ASAPQuery/asap-common/dependencies/py/promql_utilities \
186+
./run_compare_latencies.sh google_cluster_data_offset18
187+
188+
python3 analyze_monitor_output.py \
189+
/home/milind/Desktop/cmu/research/sketch_db_for_prometheus/code/ASAPQuery/experiment_outputs/google_cluster_data_offset18/sketchdb/remote_monitor_output/monitor_output.json \
190+
--print
191+
```
192+
112193
## Change the query's aggregation column or grouping label
113194

114195
The raw 2021 Node CSV has columns like:

0 commit comments

Comments
 (0)