简体   繁体   English

无法检测Amazon EC2实例上的核心

[英]Cannot detect cores on Amazon EC2 instance

I have set up a RStudio server on an Amazon EC2 micro instance (the free one, just to start). 我已经在Amazon EC2微型实例(免费的,仅供启动)上设置了RStudio服务器。 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. 我不是Linux专家,所以我不知道这是怎么回事。 How can it be a memory problem? 怎么可能是内存问题?

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. 您可能需要在更大的实例上运行-仅具有613MB内存的微型计算机没有足够的空间进行任何合理的内存计算。 You might want to take a look at this article from another used who has tried using micros and run into problems: 您可能想看看另一位尝试使用micros并遇到问题的二手用户的这篇文章:

http://datalearner.wordpress.com/2013/08/14/memory-for-rstudio-server-on-aws-micro-instance/ 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. 另一个问题是微型实例最多只能爆裂2个ECU。 They are intended for development mostly. 它们主要用于开发。 When you start to use too much CPU Amazon will throttle the instance down. 当您开始使用过多的CPU时,Amazon将降低实例速度。 I've been thru this many times and it's quite painful, so while a micro has very attractive financials (eg free) it's usually not useful in the long run. 我已经去过很多次了,这很痛苦,所以虽然微型财务非常吸引人(例如免费),但从长远来看通常没有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM