feat(asap-tools): separate clickhouse ingest and query cpu/memory monitoring in experiment run clickhouse - #522
Conversation
…oring Baseline bulk load now runs under a dedicated ingest monitor that writes monitor_output_ingest.json and stops via a stop file, so ingest CPU/memory is not mixed with the query-phase monitor_output.json. Co-authored-by: Cursor <cursoragent@cursor.com>
Match remote_monitor by execution mode and experiment dir, avoid writing null monitor JSON, escalate stuck sampler with kill(), and clarify ingest stop-file semantics. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
milindsrivastava1997
left a comment
There was a problem hiding this comment.
Does experiment_run_e2e.py need any changes? Has that script been run once with the new remote monitor to verify?
|
Comments from CR with Claude: Hard violations
Magic numbers
Implemented but wrong
|
|
Hard violation #2 (unconditional Hard violation #1 (SIGTERM/SIGINT handler swallowing): Fix: restore |
|
Removed force kill of remote_monitor. Reverted back to behavior where we wait for remote_monitor to stop gracefully. |
…ecycle - Remove the timeout-driven force-kill escalation from wait_for_remote_monitor_to_finish() and the ingest monitor's finally block; both now poll forever like the pre-PR behavior. This was unscoped for experiment_run_e2e.py's call site and, in the ingest case, pkill could hit the forked sampler child directly (same cmdline as the parent, no exec), losing partial data instead of letting the graceful pipe handoff complete. kill_remote_monitor() is still used, just only from the existing .stop() teardown path. - Fix cfg.manual.remote_monitor=true always crashing in the ClickHouse ingest path: wait_for_remote_monitor_start() assumed the monitor was already running, but manual mode never starts it automatically. Guard it like the existing pattern in _run_query_workload. - Replace scattered timeout/poll-interval literals with named constants in constants.py, matching the file's existing pattern. - Drop now-redundant default arguments (timeout/polling_interval on the wait_for_remote_monitor_* helpers, pre_query_wait_seconds/ monitor_interval_seconds on RemoteMonitorService.start(), and --monitor_interval_seconds on remote_monitor.py's CLI) now that every real call site passes them explicitly from config.yaml. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts: # asap-tools/experiments/constants.py
Summary
experiment_run_clickhouse.baseline/remote_monitor_output/monitor_output_ingest.jsonand stops via a stop file (with kill fallback); query phase still writesmonitor_output.json.flow.steady_state_waitbefore the query client so precompute + query land in one time series (with bare-metal thread attribution).kill(), matchremote_monitor.pyby--execution_mode+ experiment dir, and avoid writingnullmonitor JSON on timeout.