Application killed

I am running R (2.14.1 / 2.13.2) on a 64 bit, 4 Gb RAM laptop using somewhat large databases (around 2 million observations and 10 variables) and am getting the process killed. This is not a warning that originates in the application, so it appears to be related to the way the operative system handles memory usage. I am running Opensuse 12.1.

The process is killed even when I run R directly from the terminal. Running the application as super user to attempt to make the OS not kill the process doesn’t work; after 10 minutes of working the process is killed. The terminal just spits out “Killed”. I was able to work properly using the exact same data and code under Debian.

How can I avoid having this process killed?

Some output:


~]$ free
             total       used       free     shared    buffers     cached
Mem:       3999308     875972    3123336          0      34024     389132
-/+ buffers/cache:     452816    3546492
Swap:      2103292          0    2103292

My /etc/sysconfig/ulimit file:


HARDVIRTUALLIMIT="0"
SOFTVIRTUALLIMIT="80"
HARDRESIDENTLIMIT="0"
SOFTRESIDENTLIMIT="85"
HARDSTACKLIMIT="0"
SOFTSTACKLIMIT="0"
HARDDATALIMIT="0"
SOFTDATALIMIT="0"
HARDLOCKLIMIT="@256"
SOFTLOCKLIMIT="@64"
HARDCPULIMIT="unlimited"
SOFTCPULIMIT="0"
HARDFDLIMIT="8192"
SOFTFDLIMIT="1024"
HARDCORELIMIT="unlimited"
SOFTCORELIMIT="0"
HARDFILESZLIMIT="unlimited"
SOFTFILESZLIMIT="unlimited"
HARDPROCESSLIMIT="0"
SOFTPROCESSLIMIT="0"

(I hope this is the right sub-forum to post.)

Help much appreciated.

It would be nice if you could show some output/logfilecontent, exact messages. Question: how did you install “R”?

On 2012-02-20 12:46, monoRhesus wrote:
>
> I am running R (2.14.1 / 2.13.2) on a 64 bit, 4 Gb RAM laptop using
> somewhat large databases (around 2 million observations and 10
> variables) and am getting the process killed. This is not a warning that
> originates in the application, so it appears to be related to the way
> the operative system handles memory usage. I am running Opensuse 12.1.

Run in a terminal the application “top” and watch what happens to memory
since the moment you start your program. My guess is that it uses too much
memory and is killed by the kernel. Notice that running it by root will not
help: rather it may kill the entire system instead.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I have had this problem with two versions of R, the most recent one (2.14.1) I compiled from source, and the older one (2.13.2) I installed directly from the Opensuse repos. What is frustrating about this message is that it is completely non-informative. The process just stops running and the terminal says “Killed”. That’s it. Which logfile should I be looking at?

I have been monitoring the CPU usage with gkrellm, and there is a repeating pattern: CPU’s start at 100%, but after a minute it goes down to the regular ~2% and then Disk starts jumping around between say 15 and 100 Mb.

On my previous Debian system the code took about 15 hours to run and I never had this problem. But the computer was an I-7 and not an I-3 as this one. Could that be it? Or do you think it is an issue with the specific memory handling of Opensuse?

Thanks.

Or could it be some specific configuration of the partitions, swap memory space and the like, of which I really don’t know much?

On 2012-02-20 20:26, monoRhesus wrote:
>
> Or could it be some specific configuration of the partitions, swap
> memory space and the like, of which I really don’t know much?

Yes, it can be. You have to look at the memory usage, not cpu usage.

All logs are at the same place, /var/log. Just do a “ls -ltr wherever” and
find which file was last written.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I solved my problem by reinstalling Opensuse and creating a new swap partition with 6 Gb, for a total of 8Gb in swap. Then I changed the swappiness to 10. I’ve read that this amount of swap disk is ridiculous but I tried copying the initial settings of my previous Debian machine, where R ran ok. I don’t know if this was it but R runs nicely now. I also know there are more elegant ways of resizing partitions with fdisk and mkswap but I just decided to go brute force.

Thanks.