MAUS Tracker Recon: Speed and Memory Usage
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:
Simulation (beam+G4): 31%
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.
Updated by Rogers, Chris about 9 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.