Investigate using kvm acceleration for Android x86 emulation



5 years ago
5 years ago


(Reporter: gbrown, Assigned: gbrown)


Firefox Tracking Flags

(Not tracked)




5 years ago
I thought that we looked into kvm before and found that it could not be used in our environment, but I can find no evidence of that now.

If we can use kvm, it might improve our test run-times.

Comment 1

5 years ago
On the loaner ix box, I followed these instructions:


sudo apt-get install cpu-checker
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
sudo adduser cltbld libvirtd

I did not install virt-manager; I did not need to chown anything.

To verify installation:

[ ~]$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
[ ~]$ virsh -c qemu:///system list
 Id Name                 State

[ ~]$ ls -l /dev/kvm
crw-rw----+ 1 root kvm 10, 232 Oct 18 10:30 /dev/kvm

Comment 2

5 years ago
I added these command line options when starting the emulator:

-qemu -m 512 -enable-kvm

(this must be at the *end* of the command line).

I tried running reftest-1 (of 10 chunks) against nightly. It completed in under 5 minutes!! (Previously only completed 80% of the tests in 60 minutes.)

Running full tests suite now...

Comment 3

5 years ago
Over the weekend, I ran the full test suite on the loaner with kvm several times. I found no significant regressions due to kvm: A few extra tests pass and/or fail, so manifests will need an update, but no major changes to results.

The run times are fantastic: All reftests and mochitests run much, much faster, while Robocop and xpcshell run at about the same rate.

The reftest and mochitest speedup is sufficient to allow us to run R, C, JSR, and M jobs as just one chunk each. However, for R, tests often fail with OOM errors if run as one chunk; they run fine in 2 chunks.

Sample run times with kvm:

M:    22 minutes
M-gl:  2 minutes
R1:   23 minutes
R2:   22 minutes
C:    11 minutes
JSR:   5 minutes

This is great!


5 years ago
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.