简体   繁体   English

在AWS中具有t2.micro实例的集群

[英]Cluster with t2.micro instances in AWS

I am new to Amazon Web Services (AWS) & I am using the free tier t2.micro right now ( 1 CPU and 1 GB memory). 我是Amazon Web Services(AWS)的新手,我现在正在使用免费套餐t2.micro(1个CPU和1 GB内存)。 Doing some backtesting/ simulation stuff and it seems free tier is quite inadequate. 做一些回测/模拟的东西,似乎免费套餐是远远不够的。 Pretty slow actually. 实际上很慢。 Thus thinking of options which will help me to run my code at a faster speed for few hours. 因此,考虑了一些选项,这些选项将帮助我以更快的速度运行我的代码几个小时。

Option 1 : I can 1 buy CPU optimized/ higher Memory instance ( 4 cores and 4 GB RAM for example ) and then make an image of my t2.micro and run my stuff in that new one. 选项1:我可以1购买CPU优化/更高的内存实例(例如4核和4 GB RAM),然后为我的t2.micro创建映像,然后在新版本中运行我的东西。 It will be expensive though if I keep it running, so I need to "stop" the instance when I am not working ( or nothing is running ) to reduce the cost. 但是,如果我继续运行它会很昂贵,因此我需要在不工作(或什么也没有运行)时“停止”实例以降低成本。

Option 2 : I can buy spot instances. 选项2:我可以购买现货实例。 I am not sure how to use the CPU and RAM of that spot instance from my existing t2.micro. 我不确定如何使用现有t2.micro中的竞价型实例的CPU和RAM。 Can I create a temporary grid/cluster where my Head Node will be running in my t2.micro but compute node will be the spot instance ( higher CPU and RAM ), thus all my calculations, etc will be using the spot instance. 我可以创建一个临时网格/群集,其中我的头节点将在我的t2.micro中运行,但计算节点将是竞价型实例(更高的CPU和RAM),因此我的所有计算等都将使用竞价型实例。

My question : Is the Option 2 possible ? 我的问题:选项2是否可行? I program everything in python and I have all the relevant softwares/python IDEs etc are already installed in my t2.micro instance. 我用python编写了所有程序,并且所有相关软件/ python IDE等都已经安装在我的t2.micro实例中。

Any existing grid/cluster software I can use right now ? 我现在可以使用任何现有的网格/群集软件吗? I don't know C++, Csharp, Java etc. Know only phython & R so any programming stuff I need to do to build a grid/cluster must use Python :) 我不了解C ++,Csharp,Java等。仅了解phython和R,因此,我需要做的任何构建网格/集群的程序都必须使用Python :)

Thank you in advance. 先感谢您。

Much of what you are asking depends upon your use-case. 您要问的大部分内容取决于您的用例。 For example, if you have work continually arriving then you will need capacity continually available. 例如,如果您的工作不断到达,那么您将需要连续可用的容量。 However, if it is more batch-oriented then you could start/stop capacity and even use the new Amazon Batch service that can allocate resources when needed and remove them when jobs are finished. 但是,如果它更面向批处理,则您可以启动/停止容量,甚至可以使用新的Amazon Batch服务,该服务可以在需要时分配资源,并在作业完成时将其删除。

Some things to note: 注意事项:

  • You can change the Instance Type when an instance is stopped. 您可以在实例停止时更改实例类型 So, your t2.micro instance can be changed to a large instance (eg m4.xlarge) by stopping it, changing the instance type and starting it again. 因此,可以通过停止t2.micro实例,更改实例类型并重新启动来将其更改为大型实例(例如m4.xlarge)。
  • The t2.micro Instance Type is actually extremely powerful when CPU burst credits are available, but it limited in capability when all CPU Credits are consumed. 当有CPU突发信用可用时,t2.micro实例类型实际上非常强大,但在消耗所有CPU信用时,其功能受到限制。 A good machine for bursty workloads, but not continual workloads. 对于突发工作负载,但不是连续工作负载的良好机器。
  • Spot instances are great, but please note that they will be terminated if the Spot Price goes above your bid price. 竞价型实例很好,但是请注意,如果竞价价格高于您的买入价,它们将被终止。 Prices vary by region, Availability Zone within a region and instance type, so you could launch instances with a variety of attributes (different AZs, different instance types) that would make it unlikely that you would lose all capacity at the same time. 价格因地区,地区内的可用区和实例类型而异,因此您可以启动具有各种属性 (不同的可用区,不同的实例类型)的实例,从而使您不太可能同时失去所有容量。 Spot can save considerable costs and is well worth investigating. 现货可以节省大量成本,非常值得研究。
  • Take a look at Amazon EMR , which runs Hadoop to provide parallel processing across a cluster of instances. 看一下Amazon EMR ,它运行Hadoop以提供跨实例集群的并行处理。
  • Stop instances when you don't need them. 在不需要实例停止实例 That's the best way to get good value! 这是获得高价值的最好方法!

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

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