[R] Mediation analysis takes up all RAM, then all swap, and then RStudio/terminal suddenly closes

Philips Roger thebudget72 @end|ng |rom gm@||@com
Tue Jun 22 11:45:45 CEST 2021


I am using the mediation <https://cran.r-project.org/package=mediation> 
package to run a mediation analysis.

But when I call the `mediate` function, R eats up all RAM, then it eats 
up all swap, and then RStudio suddenly closes.

The same happens if I call `Rscript` from the terminal, and the terminal 
suddenly closes.

Here is measures for RAM and swap. Notice the peaks:

RAM diagnostics

I have Fedora Worstation 24.

This happens BOTH with the R 4.0.5 that uses Open BLAS provided in the 
Fedora repository, and a custom R 4.1.0 I compiled from source linked 
against Intel MKL.

It doesn't seem to happen every time, some times (rarely), the RAM stays 
constant (around 40/50%) and it works (it takes a long time through).

What is the cause of this? How can I debug?



More information about the R-help mailing list