Home | News | Documentation | Download

THnSparse stuck at some point


I am trying to fill a ThnSparseI with a dimension of 1024x1024x180x3. The first 10e6 filling are quite fast (5e4 evts/s), and then suddently, it falls down to less than 100 evts/s… Is it a known behavior ?

Thanks in advance


@couet can you please suggest something here? Thank you!

Hi Jérémie,

Memory allocation? Maybe the histogram is not as sparse as you think? You have 400e6 bins. If you fill 10e6 of them with 1 cts you will have to start allocate quite big chunks of memory…? An idea that might be just wrong as I have never taken the time to look under the hood of the thnsarse class


Yes, check the memory used but ROOT when are running your program. At some point your Ram my be full and pagination starts.

Hi, thanks for your help. I finally decided to do my analysis without using ThnSpare. But I don’t think it was coming from my memory, because when I was processing my analysis with proof, using two threads, both threads were correctly filling half of my full stat, and the mering finished correctly. In this cas, using 2 threads, I use two times more memory. Anyway, as I said, I am now doing differently, and cannot test anymore the THnSparse version.