Skip to content

DPL: add dpl-tune, a tuner of the runtime configuration of a workflow - #16261

Open
ktf wants to merge 1 commit into
AliceO2Group:devfrom
ktf:pr16261
Open

ktf wants to merge 1 commit into
AliceO2Group:devfrom
ktf:pr16261

Conversation

@ktf

@ktf ktf commented Dec 2, 2026

Copy link
Copy Markdown
Member

dpl-tune runs a workflow dumped with --dump-workflow on a few input files
with --resources-monitoring, reads performanceMetrics.json and proposes
--aod-memory-rate-limit, --pipeline, --readers, --timeframes-rate-limit and
--shm-segment-size within a memory budget, explaining each change with the
metric behind it. The tuned configuration is then run on the same inputs and
backed off if it fails or is not faster. It can also tune from an existing
performanceMetrics.json, e.g. from a Grid job, without running anything.

Since performanceMetrics.json has no memory on macOS, the memory of every
process is sampled while the workflow runs (phys_footprint on macOS, PSS from
/proc on Linux).

On two analysis reproducers it raised --aod-memory-rate-limit from 200 MB to
about 1.1 GB and made the runs 1.6x faster on the probe inputs and 1.9x on a
larger set of inputs it had not seen, within a 16 GiB budget. It changed
nothing on a reconstruction workflow bound by its start-up.

--readers > 1 together with --aod-memory-rate-limit deadlocks in the current
O2, so a failed verification backs off the extra readers first; this guard can
be switched off with --no-readers-guard.

The script uses the Python standard library only. Like the other scripts in
Framework/Core/scripts it is installed with pip, which provides a dpl-tune
command.

dpl-tune runs a workflow dumped with --dump-workflow on a few input files
with --resources-monitoring, reads performanceMetrics.json and proposes
--aod-memory-rate-limit, --pipeline, --readers, --timeframes-rate-limit and
--shm-segment-size within a memory budget, explaining each change with the
metric behind it. The tuned configuration is then run on the same inputs and
backed off if it fails or is not faster. It can also tune from an existing
performanceMetrics.json, e.g. from a Grid job, without running anything.

Since performanceMetrics.json has no memory on macOS, the memory of every
process is sampled while the workflow runs (phys_footprint on macOS, PSS from
/proc on Linux).

On two analysis reproducers it raised --aod-memory-rate-limit from 200 MB to
about 1.1 GB and made the runs 1.6x faster on the probe inputs and 1.9x on a
larger set of inputs it had not seen, within a 16 GiB budget. It changed
nothing on a reconstruction workflow bound by its start-up.

--readers > 1 together with --aod-memory-rate-limit deadlocks in the current
O2, so a failed verification backs off the extra readers first; this guard can
be switched off with --no-readers-guard.

The script uses the Python standard library only. Like the other scripts in
Framework/Core/scripts it is installed with pip, which provides a dpl-tune
command.
@ktf
ktf requested a review from a team as a code owner December 2, 2026 13:42
@ktf

ktf commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

@shahor02 as discussed. I am improving the infrastructure to report also backpressure and shared memory to optimise things also based on that.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant