Support #1277
MAUS Tracker Recon: Speed and Memory Usage
0%
Description
While setting up large data production, speed and memory usage became an issue to optimise. Here is the fractional time consumed by different parts of MAUS while running a simulation with 1 tracker only:
Time
Simulation (beam+G4): 31%
MCDigitization: 19%
Tracker Clustering: 30%
SpacePoint Recon: 9%
Pattern Recognition: 10%
Kalman Fit: 2%
This already included an optimisation in the MCDigitization which made it much faster. 2000 spills with 2 particle events each take about 35min to run on a i7 3.4GHz processor. The main point I have to make here is that looping over MiceModules is very time expensive but I don't see how to avoid it.
Memory consumption is abnormal. The 4000 particle events simulated consume about 5Gb of RAM while performing simulation and full tracker reconstruction. There seem to be memory leaks in the object processors. I'll attach the valgrind trace for a short 10 spill run.
Please leave your feedback/suggestions.
Files
Related issues
Updated by Santos, Edward over 10 years ago
- File valgrind_out.log valgrind_out.log added
Attaching the valgrind log.
Updated by Rogers, Chris over 10 years ago
The main point I have to make here is that looping over MiceModules is very time expensive but I don't see how to avoid it.
Where in the code do you loop over MiceModules?
Updated by Rogers, Chris over 10 years ago
Conversation with Ed
- For MiceModules, looks like he is making lots of string compares and coordinate transformations in the clustering algorithm (MiceModules index by string, so to do a MiceModule look up requires inherent string compare). Recommend that clustering algorithm does a lookup from MiceModules at birth time in order to pull out the relevant data.
- For memory leak - thanks for the warning, Rogers will have a look.
Updated by Santos, Edward over 10 years ago
- File datacard.py datacard.py added
- File HelicalTest_tracker0.dat HelicalTest_tracker0.dat added
Adding datacard and geometry configuration file.
Updated by Rogers, Chris over 10 years ago
I raised memory leak as #1278. I will try to run your test example against the tracker_devel branch.
Updated by Rogers, Chris over 10 years ago
- Category set to Tracker
- Assignee set to Santos, Edward
- Target version set to Future MAUS release
Updated by Santos, Edward over 10 years ago
Mostly yes but I want to keep optimising for speed and maybe write down the "final" performance values here... I still find that the clustering is taking too much time. Let's leave it till the code review on Friday?
Updated by Rogers, Chris over 10 years ago
Comment from Ed (in person) - speed hog appears to be the JSON <-> CPP conversion
Updated by Hunt, Christopher over 8 years ago
- Assignee changed from Santos, Edward to Hunt, Christopher
Ed's left so I'll take a look when I have time at the recon algorithms.