kqemu speed up

Dan Nelson dnelson at allantgroup.com
Fri Nov 4 07:26:24 PST 2005


In the last episode (Nov 04), Andriy Gapon said:
> How much does kqemu speed up qemu ?
> What is the typical difference in speed between guest running in
> qemu+kqemu and host ?
> 
> The reason I am asking is the following:
> 
> host (FreeBSD 5.4):
> $ /usr/bin/time -h dd if=/dev/random of=/dev/null bs=4 count=100k
> 409600 bytes transferred in 0.342956 secs (1194322 bytes/sec)
> 
> guest (FreeBSD 6.0):
> $ /usr/bin/time -h dd if=/dev/random of=/dev/null bs=4 count=10k
> 409600 bytes transferred in 59.620314 secs (6870 bytes/sec)
> 
> As you can see the difference is two orders of magnitude. I think I
> had similar figures without kqemu and I thought that with kqemu guest
> speed is close to host speed. What gives ?

Maybe something to do with reading /dev/random ends up doing an
operation that even kqemu must pass up to the host OS?  kqemu simply
allows more host instructions to be processed by the host CPU directly
without translation (since regular qemu is simply a very fast x86
instruction emulator).  If you were to compare an application that
spends most of its time in userland, you should see more of an
improvement.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-emulation mailing list