# RAM blows up while using Dataframes/Snapshot

**URL:** <https://root-forum.cern.ch/t/ram-blows-up-while-using-dataframes-snapshot/54070>\
**Category:** ROOT\
**Tags:** rdataframe\
**Created:** [March 16, 2023, 3:05pm UTC](https://root-forum.cern.ch/t/ram-blows-up-while-using-dataframes-snapshot/54070 "2023-03-16T15:05:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [March 16, 2023, 6:00pm UTC](https://root-forum.cern.ch/t/ram-blows-up-while-using-dataframes-snapshot/54070/2 "2023-03-16T18:00:31Z")

</div>

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.&nbsp;Profiling Heap and Stack Space with Massif Red Hat Enterprise Linux 6 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/performance_tuning_guide/ch05s03s03); the discussion at [Optimize memory usage while using RDataFrame - #3 by eguiraud](https://root-forum.cern.ch/t/optimize-memory-usage-while-using-rdataframe/54014/3) might also interest you).

All the best,  
Enrico

---

_[View the full topic](https://root-forum.cern.ch/t/ram-blows-up-while-using-dataframes-snapshot/54070)._
