Paravirtual vs HVM images

Paravirtual vs HVM images

Once upon a time, about last Monday, I thought PV AMIs were "the thing". Then I noticed the AWS Web Console had moved the HVM Amazon Linux AMI to the top of the list. I did a little more digging, and found that every 2nd generation instance type can use HVM, but only a subset can use PV. This is the opposite of the 1st generation instances.

Intrigued, I started asking around but no one could say for certain what the future held. So, since I was paying for Business Support anyway, I though I'd ask them. The response from Adam L was nothing short of phenomenal. I have included it here unedited with all the technical details:

Thanks for reaching out to AWS and to answer your question from my understanding I would be in favor of the HVM type of Virtualization. You'll have noticed when you launch an instance i the EC2 console this is step 1. You will have a choice between paravirtual (PV) or hardware virtual machine (HVM). Some current generation instance types support only HVM AMIs, while some previous generation instance types support only PV AMIs. The main difference between PV and HVM AMIs is the way in which they boot and whether or not they can take advantage of special hardware extensions (CPU, network, and storage) for better performance.

Take a look at this link: and note the following extract:

For the best performance, we recommend that you use current generation instance types and HVM AMIs when you launch new instances. For more information on current generation instance types, see the Amazon EC2 Instances detail page (via If you are using previous generation instance types and you are curious about upgrade paths, see Upgrade Paths (

Paravirtual guests traditionally performed better with storage and network operations than HVM guests because they could leverage special drivers for I/O that avoided the overhead of emulating network and disk hardware, whereas HVM guests had to translate these instructions to emulated hardware. Now these PV drivers are available for HVM guests, so operating systems that cannot be ported to run in a paravirtualized environment (such as Windows) can still see performance advantages in storage and network I/O by using them. With these PV on HVM drivers, HVM guests can get the same, or better, performance than paravirtual guests.

Unlike PV guests, HVM guests can take advantage of hardware extensions that provide fast access to the underlying hardware on the host system. For more information on CPU virtualization extensions available in Amazon EC2 (see HVM AMIs are required to take advantage of enhanced networking and GPU processing. In order to pass through instructions to specialized network and GPU devices, the OS needs to be able to have access to the native hardware platform; HVM virtualization provides this access. For more information, see Enhanced Networking and GPU Instances via:


My own thoughts on this is that with HVM virtualization, the guest VM runs as if it were on a native hardware platform, except that it still uses paravirtual (PV) network and storage drivers for improved performance. PV or paravirtualized instances some pieces of code in the Linux kernel that talk directly to hardware were replaced to talk to a host hypervisor instead. (

Paravirtualization avoids the need to emulate a full set of hardware" - but also means you cannot use the full set of hardware. PV has performance benefits for some operations due to the shorter code paths, but not everything is virtualized in this way, for example Network I/O has to talk to a wire at some point and there are a lot of hardware interrupts involved so the hypervisor (Xen) has traditionally had relatively poor packet-per-second (PPS) performance.

With the increase in popularity of virtualization, chip manufacturers like Intel and AMD implemented hardware virtualization support beginning in 2006. Today's hardware platforms such as Intel's Ivy Bridge used in EC2's R3, C3, I2 instance types have very complete technology support for HVM including VT-d input/output memory management unit (IOMMU) and single-root I/O virtualization (SR-IOV) for PCI Express NICs ( Basically, for memory access operations the IOMMU performs the guest-physical to host-physical translation in hardware instead of it being done in software by the hypervisor, making it far faster. In other words, due to virtualization support in IOMMU hardware, PV no longer provides the best performance.

This makes the new HVM instances outperform PV for most tasks, and there is a huge difference on networking. Having said that to get the optimum I/O performance from these instances, you should use the Amazon Linux AMI 2013.09.02 (or later) or any Linux AMI with a version 3.8 (or newer kernel). Older versions of the kernel will exhibit lower I/O performance when used with R3, C3 and I2 instances.

I hope my response has shed some light on this topic. I would encourage you to do some benchmark tests in your environment and chose whatever works for you. If there are any follow up questions regarding this please do let us know. Please don't hesitate to contact support if you need further assistance.

So there you have it... HVM is the future. Thanks again Adam. You Rock!

Learn more about Yeobot today!

comments powered by Disqus