From tomk at 0xdata.com  Tue Aug  5 04:49:04 2014
From: tomk at 0xdata.com (Tom Kraljevic)
Date: Mon, 4 Aug 2014 19:49:04 -0700
Subject: [Rd] R process (and forked children via system2) are limited to 1
	core?
Message-ID: <C18CFF68-673E-4879-8D07-7CE4E8BF164B@0xdata.com>


Hi,


(Using R 3.1.1 on Ubuntu 12.04.4 LTS)


What is the recommended way for R to fork a (non-R) process that is not CPU limited?
Currently I am using R?s system2() call, and this is inheriting the environment of the R process.


I notice that (at least on Linux) when I am poking around /proc that the R process itself is setting up cpu limitations for itself (max 1 core).


Using strace, I see the following:

(strace output)
out.20612:sched_setaffinity(0, 128, {100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}) = 0


And proc shows:

(cat /proc/nnn/status)
Cpus_allowed:   00000001
Cpus_allowed_list:      0


See that the Cpus_allowed bitmask is a single core.  Normally it?s fff?f.


I want my child process (java in this case) not to share this limitation.  What is the recommended way of doing this from R?
Any ideas or suggestions appreciated!


Thanks,
Tom



[Rd] R process (and forked children via system2) are limited to 1 core?
Tom Kraljevic