0

I have set up a RStudio server on an Amazon EC2 micro instance (the free one, just to start). I've done this following this tutorial. As I understand from the description, the machine should have two cores, so I would like to use it for parallel computations (if it works with two cores, I will then extend it to more powerful machines). However when I run

parallel::detectCores()

on I get the following error message

Error in system(cmd, TRUE) : 
cannot popen 'grep processor /proc/cpuinfo 2>/dev/null | wc -l', probable reason 'Cannot allocate memory'

I'm not a Linux expert so I don't know what's going on here. How can it be a memory problem?

splinter123
  • 1,183
  • 1
  • 14
  • 34
  • 1
    It has 1 core that is considered burstable up to 2 ECU's of computing power. ECU is a unit of CPU power, not a number of cores. – datasage May 27 '14 at 17:39
  • ok, thanks it makes more sense now. But in that case why doesn't it simply return "1" instead of a memory allocation error? – splinter123 May 27 '14 at 18:43
  • Not sure. Micro instances do also have very little physical memory (613 MB). Some applications have difficulty running in this environment unless they are explicitly capped at a low amount of memory. – datasage May 27 '14 at 19:58

1 Answers1

0

You probably need to be running on a larger instance - a micro with only 613MB of memory is not a lot of room for doing any reasonable computations in memory. You might want to take a look at this article from another used who has tried using micros and run into problems:

http://datalearner.wordpress.com/2013/08/14/memory-for-rstudio-server-on-aws-micro-instance/

The other issue is that micro instances only burst up to 2 ECUs. They are intended for development mostly. When you start to use too much CPU Amazon will throttle the instance down. I've been thru this many times and it's quite painful, so while a micro has very attractive financials (e.g. free) it's usually not useful in the long run.

John Petrone
  • 26,943
  • 6
  • 63
  • 68