# Dataframe Snapshot - file larger than 100 GB

**URL:** <https://root-forum.cern.ch/t/dataframe-snapshot-file-larger-than-100-gb/49794>\
**Category:** Newbie\
**Tags:** rdataframe, python\
**Created:** [April 29, 2022, 3:35pm UTC](https://root-forum.cern.ch/t/dataframe-snapshot-file-larger-than-100-gb/49794 "2022-04-29T15:35:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrobac](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/50afbb/32.png) [@adrobac](https://root-forum.cern.ch/u/adrobac)\
**Post date:** [April 29, 2022, 3:35pm UTC](https://root-forum.cern.ch/t/dataframe-snapshot-file-larger-than-100-gb/49794/1 "2022-04-29T15:35:01Z")

</div>

Hi there,

I am working in pyroot (ROOT version 6.22/00) and am attempting to write a number of rather large dataframes to an output file using Snapshot(). The command I’m using is something like

frames[systematic].Snapshot(systematic,outFileName,branch\_list,opts)

where frames is the dictionary of dataframes, one for each systematic in the analysis and branch\_list is the list of columns to carry over to the snapshot file. For some of the larger input files, I run into the problem of trying to merge files larger than 100 GB:

Fatal in TFileMerger::RecursiveRemove: Output file of the TFile Merger (targeting [FILE]) has been deleted (likely due to a TTree larger than 100Gb)  
aborting

I have seen in other forums (e.g. [Root 6.04.14 hadd 100Gb and rootlogon](https://root-forum.cern.ch/t/root-6-04-14-hadd-100gb-and-rootlogon/24581)) that you can include a C++ header file and load some libraries to get around this, but I’m not sure how this works with pyroot (not to mention that I am not at all fluent in using shared libraries). Any suggestions?

Thank you!

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [May 2, 2022, 11:47am UTC](https://root-forum.cern.ch/t/dataframe-snapshot-file-larger-than-100-gb/49794/2 "2022-05-02T11:47:04Z")

</div>

Hello,

You can try to use the same LD\_PRELOAD mechanism but with the Python executable:

```auto
LD_PRELOAD=startup_C.so python your_RDF_script.py

```

@pcanal is that mechanism to call `TTree::SetMaxTreeSize` still what is needed to circumvent the limitation?

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [May 10, 2022, 8:42pm UTC](https://root-forum.cern.ch/t/dataframe-snapshot-file-larger-than-100-gb/49794/3 "2022-05-10T20:42:45Z")

</div>

@etejedor Yes unless pyroot source the rootlogon.C

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [May 11, 2022, 8:25am UTC](https://root-forum.cern.ch/t/dataframe-snapshot-file-larger-than-100-gb/49794/4 "2022-05-11T08:25:01Z")

</div>

pyroot does source the `rootlogon.C` if it exists and there is no `rootlogon.py`.

You mean then that `TTree::SetMaxTreeSize` can be set in a rootlogon.C (or even rootlogon.py).

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [May 18, 2022, 7:46pm UTC](https://root-forum.cern.ch/t/dataframe-snapshot-file-larger-than-100-gb/49794/5 "2022-05-18T19:46:32Z")

</div>

> You mean then that `TTree::SetMaxTreeSize` can be set in a rootlogon.C (or even rootlogon.py).

Yes 🙂
