# JIT Compilation Memory Hogs in RDataFrame

**URL:** <https://root-forum.cern.ch/t/jit-compilation-memory-hogs-in-rdataframe/43578>\
**Category:** ROOT\
**Tags:** rdataframe\
**Created:** [February 17, 2021, 1:30pm UTC](https://root-forum.cern.ch/t/jit-compilation-memory-hogs-in-rdataframe/43578 "2021-02-17T13:30:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrendonB](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/439d5e/32.png) [@BrendonB](https://root-forum.cern.ch/u/BrendonB)\
**Post date:** [February 17, 2021, 1:30pm UTC](https://root-forum.cern.ch/t/jit-compilation-memory-hogs-in-rdataframe/43578/1 "2021-02-17T13:30:27Z")

</div>

Hello,

We are encountering this RDF JIT memory hog issue that has been discussed at length in other forum posts. Our use case is ntuple production postprocessing in ATLAS analysis. We define an RDataFrame for each of our ntuples (when we process systematics, that’s ~115 ntuples per file) and apply some Filters and Defines, and save the output in a Snapshot. When processing systematics, we run into the memory hog issue and causes a crash when running production on the grid. Release 6.22 is not available on the grid at the moment, but local tests do reflect an improvement in memory management advertised by the ROOT team (though the runaway behavior of memory hogging still exists, see attached plot).

We have implemented the suggested workaround with python’s multiprocess module, as suggested by [eguiraud](https://root-forum.cern.ch/u/eguiraud) in other forum posts (e.g. [this post](https://root-forum.cern.ch/t/memory-leak-with-rdataframe-in-python/43069/4) from a few weeks ago). We trigger each of the RDF event loops in a separate Process and it solves the memory hog issue.

This is all to say that 1) we are another of a growing number of user groups who are impacted by this JIT compilation behavior and 2) while developers work to fix it, the suggested workaround with the multiprocess module works for PyROOT users.

Cheers!

[RDF\_MemoryLeak\_R6.22.pdf](https://root-forum.cern.ch/uploads/short-url/9WhVbOe63TtinBrXH51Ey8rps3X.pdf) (103.5 KB)  
[RDF\_Processes\_R6.22.pdf](https://root-forum.cern.ch/uploads/short-url/ewzRywSAqLnBQf4pl75aYWXwtpM.pdf) (82.1 KB)

* * *

_ROOT Version:_ 6.20.02  
Platform: x86\_64-centos7  
Compiler: gcc8-opt

* * *

---

<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:** [February 17, 2021, 2:03pm UTC](https://root-forum.cern.ch/t/jit-compilation-memory-hogs-in-rdataframe/43578/2 "2021-02-17T14:03:51Z")

</div>

Hi @BrendonB ,  
thank you very much for the feedback, this is good to know!

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [March 3, 2021, 2:04pm UTC](https://root-forum.cern.ch/t/jit-compilation-memory-hogs-in-rdataframe/43578/3 "2021-03-03T14:04:06Z")

</div>

Closed on March 3, 2021, 2:04pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
