Skip to content

Prepare o2dpg_sim_metrics.py for the new workflow runner - #2436

Merged
sawenzel merged 1 commit into
AliceO2Group:masterfrom
sawenzel:swenzel/sim-metrics-merge
Aug 21, 2026
Merged

Prepare o2dpg_sim_metrics.py for the new workflow runner#2436
sawenzel merged 1 commit into
AliceO2Group:masterfrom
sawenzel:swenzel/sim-metrics-merge

Conversation

@sawenzel

Copy link
Copy Markdown
Contributor

This is the first step of a refactoring of MC/bin/o2_dpg_workflow_runner.py into a modular package, presented at CHEP 2026. It updates the metrics tool to read what that runner writes, and fixes two numbers it was already getting wrong.

  • cgroup_cpu and cgroup_mem are read when the runner ran under --systemd-run, and slice-level CPU is preferred over the sum of per-task psutil readings.
  • cgroup_global and global_init_task rows are internal markers and no longer enter the per-task statistics.
  • lifetime was an iteration count and is now seconds, which is what the new schedule simulator reads it as. update_resource_estimates() only reads pss.max and cpu.mean, so the current runner is unaffected.
  • json-stat reads the *.log_time files written by GNU time, and falls back to user time where a task was too short for its 10 ms wall resolution.
  • The runtime estimate assumed every monitor iteration takes 5 seconds. On a 12.2 s run it reported 65 s. Walltime now comes from the log timestamps, which gives 10.9 s for the same run.
  • min_lifetime was computed with .max(). It now uses .min(), and a std is reported alongside.

https://indico.cern.ch/event/1471803/contributions/6967072/

@sawenzel
sawenzel requested a review from jackal1-66 as a code owner August 21, 2026 11:32
@github-actions

Copy link
Copy Markdown

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

@sawenzel
sawenzel enabled auto-merge (rebase) August 21, 2026 12:57
@sawenzel
sawenzel disabled auto-merge August 21, 2026 14:25
@sawenzel
sawenzel merged commit 0cc4061 into AliceO2Group:master Aug 21, 2026
8 checks passed
@sawenzel
sawenzel deleted the swenzel/sim-metrics-merge branch August 21, 2026 14:25
This is the first step of a refactoring of MC/bin/o2_dpg_workflow_runner.py
into a modular package, presented at CHEP 2026. It updates the metrics tool to
read what that runner writes, and fixes two numbers it was already getting
wrong.

- cgroup_cpu and cgroup_mem are read when the runner ran under --systemd-run,
  and slice-level CPU is preferred over the sum of per-task psutil readings.
- __cgroup_global__ and __global_init_task__ rows are internal markers and no
  longer enter the per-task statistics.
- lifetime was an iteration count and is now seconds, which is what the new
  schedule simulator reads it as. update_resource_estimates() only reads
  pss.max and cpu.mean, so the current runner is unaffected.
- json-stat reads the *.log_time files written by GNU time, and falls back to
  user time where a task was too short for its 10 ms wall resolution.
- The runtime estimate assumed every monitor iteration takes 5 seconds. On a
  12.2 s run it reported 65 s. Walltime now comes from the log timestamps,
  which gives 10.9 s for the same run.
- min_lifetime was computed with .max(). It now uses .min(), and a std is
  reported alongside.

https://indico.cern.ch/event/1471803/contributions/6967072/

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant