![]() |
Project
|
This document will summarize the tools that can be used to get information about the memory and CPU time evolution of simulations in ALICE O2.
In this folder you will find two scripts:
monitor.sh
process.py
Both of these scripts define the two step procedure (monitoring and processing) of obtainging performance metrics of interest: maximum memory, average memory, maximum CPU time, wall clock time, (CPU)/(wall clock) time ratio and lastly plots of the evolving memory and cpu as a function of wall clock time.
You can monitor whatever you like as:
$> ./monitor.sh <your o2 command>
To obtain plots of (FairMQ) devices operating in the simulation you will have to generate a logfile as:
$> ./monitor.sh <your o2 command> | tee o2xxx.log
e.g. if you wish to monitor 50 pp (pythia) events with Geant3 as the VMC backend using the FIT detector and utilizing parallel mode with 2 simulation workers AND keep track of FairMQ devices, you can do:
$> ./monitor.sh o2-sim -g pythia8pp -e TGeant3 -m FV0 FT0 FDD -j 2 -n 50 | tee o2sim.log
Similarly you can monitor the digitization routine as:
$> ./monitor.sh o2-sim-digitizer-workflow -b --run | tee o2digi.log
NB! notice the --run
that is needed (only digitization) in order to overload the PIPE |
command in DPL (Data Processing Layer).
The ./monitor.sh
script will generate 4 .txt files in total: mem_evolution_xxxx.txt, cpu_evolution_xxxx.txt, time_evolution_xxxx.txt, pid_evolution_xxxx.txt. Here xxxx is the PID (process identifcation) number of the main process responsible for the command (driver application). You will have to parse two of these files (mem and cpu) in the next step.
The monitored data has to be processed as: $> python3 process.py mem_evolution_xxxx.txt cpu_evolution_xxxx.txt
This will generate an output:
and generate two plots each:
if no logfiles where provided the plots would look like: