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?
| backend_tool: Optional[str] = None, | ||
| timed_duration: Optional[int] = None, | ||
| pre_query_wait_seconds: int = 0, | ||
| monitor_interval_seconds: float = 1.0, |
There was a problem hiding this comment.
If this is defined in config.yaml, can we remove the default argument here
| self, | ||
| minimum_experiment_running_time: int, | ||
| polling_interval: int = 10, | ||
| timeout: int = 600, |
There was a problem hiding this comment.
do we need this default arg?
|
|
||
|
|
||
| def stop_monitor(monitor, control_pipe, monitor_pipe): | ||
| def stop_monitor(monitor, control_pipe, monitor_pipe, timeout=30): |
There was a problem hiding this comment.
do we need this default arg
| backend_protocol: str, | ||
| backend_tool: Optional[str] = None, | ||
| timed_duration: Optional[int] = None, | ||
| pre_query_wait_seconds: int = 0, |
There was a problem hiding this comment.
do we need this default arg if the cmd line args already have a default value
| parser.add_argument( | ||
| "--monitor_interval_seconds", | ||
| type=float, | ||
| default=1.0, |
There was a problem hiding this comment.
if this is defined in config.yaml, do we need this default arg?
|
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 |
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.