Start Your Free Trial

Why the Android emulator runs very slowly on AWS & Google cloud – and how you can make it 16x faster

If you have ever tried running the Android emulator on AWS, you have probably seen that it is really slow. In fact, its so slow that its practically not usable.

The reason for this is that the Android emulator is optimized to run on Linux/KVM on physical hardware (a developers desktop or a server in the data center).

android-notice

Android emulator on a physical x86 system

This physical hardware has Intel-VT or AMD-V virtualization extensions (hardware assisted virtualization support) in silicon which enables it to run KVM which in turn makes the Android emulator run fast.

Android Stack on Physical x86
Figure 1 shows the entire stack on physical x86.

Android emulator on AWS or Google Cloud

In a lot of cases, you may want to run the Android emulator in a public cloud for continuous integration, end user experience testing, performance and scale testing etc. However, if you get a Linux VM from AWS or Google Cloud, you will find that you cannot run KVM.

This is because the VM does not have access to the hardware acceleration in the underlying physical host (AWS’s hypervisor does not support nested virtualization). As a result, you default to emulation mode (qemu) which is usually really slow. Please take a look at our blog to understand why emulation is slow compared to binary translation and other virtualization techniques.

Android Stack on AWS
Figure 2 shows the entire stack on AWS.

Android emulator on Ravello on AWS or Google Cloud

Now lets look at another approach with our nested virtualization solution. We have developed a nested hypervisor called HVX in which we have implemented “hardware acceleration” in software (essentially the Intel VT and AMD-V instruction set in software). That enables us to run KVM instead of plain qemu in a VM in the cloud which significantly boosts the speed of the Android emulator in a cloud (AWS or Google cloud) VM.

Android Stack on Ravello on AWS or Google Cloud
Figure 3 shows the entire stack on Ravello on AWS or Google cloud

Register for Ravello to see first-hand how you can run the Android Emulator on Amazon EC2 and Google Cloud.

Next steps

In our next post, we have outlined some benchmark results comparing running the Android emulator natively on AWS vs. running it on Ravello on AWS.

In the meantime, you can leverage our free trial and try it out for yourself. Here are some detailed instructions on how to install and set up the Android emulator on Ravello.

android-notice

About Ravello Systems

Ravello is the industry’s leading nested virtualization and software-defined networking SaaS. It enables enterprises to create cloud-based development, test, UAT, integration and staging environments by automatically cloning their VMware-based applications in AWS. Ravello is built by the same team that developed the KVM hypervisor in Linux.

Check our product demo video

Why the Android emulator runs very slowly on AWS & Google cloud – and how you can make it 16x faster
  • Pavel Astakhov

    Does it allow Graphical Hardware Acceleration? 🙂

    • Not with the current architecture. We are working on a new architecture which will support this. We can discuss more about your use case and discuss how to optimize your setup. You can contact us at sales@ravellosystems.com