Qemu 0.8.1 speed improvement with -kernel-kqemu and kqemu 1.3.0pre7



I mentioned the other day revisiting the qemu site to discover new versions of both qemu and the non-redistributable kernel module kqemu (qemu is now at version 0.8.1 and kqemu is at 1.3.0pre7). There’s also a new startup switch -kernel-kqemu which enables FULL virtualization of both kernel and user code. I could feel a difference in speed, but I wanted to give a test with a stopwatch to see what the numbers were and this is what I found.


For this test, I am running Mandriva 2006 as the base distribution with 2.6.12-22mdk as the kernel. I had the kqemu module modprobed, so the first test is going to be ONLY with user code virtualized on the host processor (if I understand correctly), but kqemu IS made SOME use of in the first test. (Hardware – AMD 64 3000 + processor and 1 GB memory (currently we’re running the i586 version of Mandriva instead of the 64-bit…))

Anyway, for the tests I used the kubuntu-dvd iso for 6.06 that I just downloaded yesterday. I initially ran qemu with the following command qemu -m 256 -cdrom kubuntu-dvd*iso (the kubuntu iso had a long file name -m gives us 256 MB of memory in the cdrom.) The boot process started and I did not allow the menu to time out (30seconds) and proceeded straight into the default boot. I saw the X cursor in the gui at 2 minutes 52 seconds in, the kubuntu splash starting kde at 3:11 and the desktop was loaded at 4:46 minutes in.

Then, I retried, this time with the following qemu -m 256 -kernel-kqemu -cdrom kubuntu-dvd*iso (for FULL virtualization. OK, we got the X cursor at 1 minute 34 seconds this time, the kubuntu splash at 1:50 and the desktop was done loading at the 3:02 mark ( a full minute and a half shaved off the boot process.)

I wondered what affect doubling the memory would have, so I upped the -m switch to 512 MB, and got to the full desktop at a fairly respectable 2 minutes 36 seconds. I’ve worked with the new version of qemu for several days with the kernel-kqemu acceleration and at times, full screen have forgotten that it was a virtual machine. The biggest limitation is probably memory. (I had one image that I forgot to specify -m (default is 128 MB…) With ample memory, the cd isos don’t feel like they’re in a VM.

Just for comparison, I booted up the kubuntu CD iso and found it took 2 minutes, 40 seconds to boot up with full kernel-kqemu and 512 MB of ram.

For yet another comparison, my install of Mandriva takes about 2:12 to get to the greeter and a total of 2:37 to get to the desktop – I have A TON OF SERVICES running though and haven’t tried to optimize boot time in the least. (MYSQL, HTTP, Mythtv, etc. etc. etc. NFS, etc etc samba, etc. etc…)

Anyway – I tried booting the DVD from the dvd-rom drive, but it stopped and froze at “mounting root file system”, so I don’t know how long it would take to boot “native” on my desktop. (I’ve tried with both the 64 bit cd, 32bit cd, 32bit dvd and they all freeze at that point for me. (thank goodness for qemu…)

   Send article as PDF   

Similar Posts