Repository navigation
Conversation
This reduces the memory of ITSTrackSimTask and QcMFTTrackMCTask from the size of all kinematics of the TF to that of the largest event. - The tasks cached all MC tracks of all events and kept a per-track record for each of them. - Events are now read and released one by one, and records are kept only for the tracks that are used. - The cluster-label container of ITSTrackSimTask is no longer leaked. - The histograms are unchanged (45 ITS and 9 MFT histograms compared bin by bin, same entries). Peak memory (sum of PSS) on one PbPb timeframe of 8 orbits (28 signal events, 75.6M MC tracks): | | before | after | |---|---:|---:| | ITS task total | 8.44 GB | 2.40 GB | | MFT task total | 7.80 GB | 2.16 GB | | ITS `o2-qc` device | 7.66 GB | 1.57 GB | | MFT `o2-qc` device | 7.04 GB | 1.40 GB | | wall time ITS / MFT | 33 s / 40 s | 36 s / 40 s | Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This skips MC labels whose event ID is outside the event range of the kinematics in ITSTrackSimTask and QcMFTTrackMCTask. - Such labels would index the per-event arrays out of range.
sawenzel
requested review from
AlessandroSturniolo and
iravasen
as code owners
October 8, 2026 12:06
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reduces the memory of
ITSTrackSimTaskandQcMFTTrackMCTaskby reading the MC kinematics one event at a time.Both tasks loaded all MC tracks of all events of the timeframe and kept a per-track record for each of them, and nothing was released before the end of the run. For PbPb with Geant4 (about 2.7 million MC tracks per signal event), heaptrack at 4 orbits shows 3.8 GB of cached MC tracks, plus 1.8 GB (ITS) or 1.4 GB (MFT) of per-track records. Events are now read and released one by one, and records are kept only for the tracks that are used. In addition, the cluster-label container of
ITSTrackSimTaskwas released without being deleted and is no longer leaked, and labels with an event ID outside the event range are skipped.The effect on one timeframe of 8 orbits (nightly MC
LHC22k4_nightly, run 311511, 28 signal events, 75.6M MC tracks):o2-qcdeviceo2-qcdeviceThese two tasks, with the ITS-TPC matching QC (companion AliceO2 PR), dominate the QC pass of the MC jobs, which peaks at a median of 27 GB.
Note that the histograms are unchanged: the 45 histograms of the ITS task and the 9 of the MFT task have identical bin contents, errors and entries before and after.
The measurements use the recompiled files preloaded into
o2-qcof the CVMFS dailyv20261007-1. The branch is not yet built with the QC CI.Assisted by Claude Code.