Before the days of cloud computing, administrators had to guess on the required number of CPU cores and RAM for...
an application before investing in a server. Automatic provisioning can run large number of servers -- running up large bills. Using Spot Instances can help admins find the sweet spot in server configurations -- without souring the budget.
A company that has to run a large analysis job, for example, will run a mix of libraries and code others have written. Admins may not be sure about memory and CPU requirements. They could pick a high-memory, CPU-optimized instance with a high cost, but that's not always the right solution. This practice works for one or two jobs, but it shouldn't be a long-term strategy.
A better option is to test applications with AWS Spot Instances.
To do this, create an image with all the software needed and then create Elastic Block Storage with necessary data. Finally, start multiple Spot Instances with varying configurations.
Because admins must bid on Spot Instances, be sure to check the pricing history in the AWS Management Console beforehand. In addition, check different regions -- you might find lower costs in regions other than the ones you traditionally use.
Once Spot Instances are set up, run an application and check CPU and memory use . When running on Linux, use the "free -m" command to check free memory. Linux will use as much memory as possible, when it is needed. If you have excessive amounts of free memory, consider switching to an instance with less RAM.
Run the "top" command to monitor CPU use. If your usage is at 100%, then you’re using one core at 100%. If you have a 16-core instance, you likely will see 700% utilization. That means you are keeping seven cores busy while nine are idle. You can switch to a lower cost instance without adversely affecting performance.
Spot Instances can be suspended at any time, but because you're just testing these, it shouldn't be a problem. The savings can be substantial. For example, the r3.8xlarge costs $2.80 per hour on-demand; it recently went for about $0.30 in the US-West-2 region. At these prices, it's easy to cost-justify experimenting with different instances.
About the author:
Dan Sullivan holds a Master of Science degree and is an author, systems architect and consultant with more than 20 years of IT experience. He has had engagements in advanced analytics, systems architecture, database design, enterprise security and business intelligence. He has worked in a broad range of industries, including financial services, manufacturing, pharmaceuticals, software development, government, retail and education. Dan has written extensively about topics that range from data warehousing, cloud computing and advanced analytics to security management, collaboration and text mining.
Learn more about how companies are using AWS Spot Instances
Discover why Spot Instances have received a two-minute warning