RAM blows up while using Dataframes/Snapshot

Hello @ShaliniEpari ,

and welcome to the ROOT forum!

If I understand correctly the assumption behind the question is that larger files will cause memory to grow even more, but that’s not usually the case – it could be that it will stay around that level, ROOT and RDataFrame generally try not to cache anything in memory that scales with the number of entries (there are exceptions but I don’t think they apply here).

As a first step I would suggest to switch to a more recent ROOT version, possibly v6.28, and see whether the situation is better there.

If that’s not the case, and 1.2 GB of resident memory is a deal breaker for your use case, we need to check where the allocations come from. You should run the program under valgrind --tool=massif and then post here the output of ms_print (see for example the instructions at 5.3.3. Profiling Heap and Stack Space with Massif Red Hat Enterprise Linux 6 | Red Hat Customer Portal; the discussion at Optimize memory usage while using RDataFrame - #3 by eguiraud might also interest you).

All the best,
Enrico