Amazon EC2: Ubuntu(PV) or Ubuntu(HVM)

UbuntuAmazon Ec2

Ubuntu Problem Overview


I am about to launch Ubuntu instance on Amazon EC2. I'm choosing between PV and HVM options. I found that PV does provide a more efficient virtualization model though I could be wrong and as Amazon offers both options I'm suggesting that HVM may could have some benefits I will not get with PV. I want to use this virtual machine for GIT and maybe Team City in future. Could you help me to choose?

Ubuntu Solutions


Solution 1 - Ubuntu

I would say "go with PV" (on Linux) unless you have a reason. PV has been much better tested because it was the only option for many years. (HVM for Linux was only recently introduced outside of the very special Compute Cluster nodes.)

Converting between them isn't very hard -- especially if you do it right. By "do it right", I mean using something like Chef or Puppet or Ansible to build your server. This lets you put your "server" (well, server build process) under version control, which creates instant documentation for everyone to understand what's on your server.

Your root drive should be ephemeral, so that if the server dies, you can just re-launch and re-attach your EBS data. (And you can quickly upgrade the OS or server software by launching a 2nd instance to play with.) If you have an EBS root drive, you'll have to pay to store/backup your OS, and you'll never know if your server config is checked into version control or not.

UPDATE: Going forward, I would lean toward HVM, since performance can be much better (i.e. "Enhanced Networking"). Also, it's not "brand-new" anymore.

Solution 2 - Ubuntu

In summer 2014, Amazon started recommending using HVM over PV AMIs as HVM seems to be the vision going forward. A lot of the newer & current generation instance types are only supported by HVM AMIs, for instance, memory optimized r3 types See here

With the push and R&D Amazon throwing in optimizing HVM, the PV AMI performance edge is going to be smaller and smaller IMMO.

Solution 3 - Ubuntu

Amazon just recently came out with t2 instances that use only HVM. With the t2 instance aws introduces burstable performance(use resources when in need using credits, otherwise don't run in full power) and cpu credits(obtain credits if not running in full power over 24h period of time) to ec2 instances which lowers the price dramatically.

Currently this is available only on micro, small and medium instances.

Note that it won't have local instance storage so you'd need to include at least one ebs volume.

Check out the blog post

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionalexxjkView Question on Stackoverflow
Solution 1 - UbuntuBraveNewCurrencyView Answer on Stackoverflow
Solution 2 - UbuntuDevyView Answer on Stackoverflow
Solution 3 - UbuntuKristo JView Answer on Stackoverflow