Skip to content

R getting "Killed" while running VAR model

3 messages · Vivek Singh, Jeff Newmiller

#
I am using *R version 3.0.2* (2013-09-25) on Ubuntu desktop (*Ubuntu
14.04.4 LTS*). I am running *var model *on a matrix with 199 columns and
604800 rows. The server has 12 core and 32GB of memory. When the model is
running, i checked CPU and Memory consumption using 'htop' linux command. I
observe all the cores are being used and memory memory usage is on average
17GB out of 32GB. After running the model for about an hour, the system
kills the R process. Following the output:

*> library("vars")*
*> vmodel=VAR(only_variables_without_missing, p = 1, type ="both")*
*Killed*

Please help.



Regards,

Vivek Kumar Singh

PhD student,
Information Systems Decision Sciences,
MUMA College of Business,
USF
Phone- (813) 5809131
Web: http://vivek4.myweb.usf.edu/

On Tue, May 31, 2016 at 4:41 PM, Uwe Ligges <ligges at statistik.tu-dortmund.de

  
  
#
I checked the issue on different forums like stackoverflow. The issue is
related to Out Of Memory (OOM) linux feature which kills processes that
consume large memory and swap. I started to monitor the memory and swap
consumption while VAR model was running. The R consumed all 32 GB of RAM
memory and then 20 GB of swap. I have only 32GB of RAM and 20GB of swap in
my server. Then the R was killed.

So, i have two queries:

1. Is there a way to limit the amount of memory used by R so that it runs
for longer time?

2. Is it some sort of inefficiency of garbage collector in R?



Regards,

Vivek Kumar Singh

PhD student,
Information Systems Decision Sciences,
MUMA College of Business,
USF
Phone- (813) 5809131
Web: http://vivek4.myweb.usf.edu/
On Wed, Jun 8, 2016 at 10:13 AM, Vivek Singh <vivek4 at mail.usf.edu> wrote:

            

  
  
#
1. Don't allocate it. 

2. If it was, would it make a difference? 

Seriously, some algorithms need more memory than others, and some packages are more wasteful than others. R is not monolithic... sometimes you just have to roll up your sleeves or buy more memory.