[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Virtual Machines/Emulators



Mike McCarty wrote:
I recently developed a desire to run some emulators under Linux,
and consequently have run some of them. Here are my opinions of them,
based on install, ease of use, and speed of emulation.

The emulators I tried are DOSEMU + Freedos, BOCHS + MSDOS 6.22, and
QEMU + MSDOS 6.22. I found that each had advantages and disadvantages.
I also ran MSDOS 6.0 natively.

Two machines were used. One is an AMD 586 with 16MB of RAM and a
160 MHz processor. Another is a Presario with a 2.7 GHz Celeron.
The AMD was used only for running MSDOS 6.0 natively. The Celeron
was used to run the emulators with Linux, and also to do some
native MSDOS 6.0.

        install share   speed   CPU     hardware        soft    events
DOSEMU  easy    easy    fast    low     Intel only      not all no
BOCHS   hard    hard    v.slow  high    Intel only      all     yes
QEMU    hard    hard    slow    high    multiple        all     no
  KQEMU   v.hard  hard   *fast    low     multiple        all     no

KQEMU will not build properly. A buried Makefile used -nostdinc
but the source includes <stdarg.h> and <stdlib.h>. Also, the
shipped Makefile for modules in the kernel source area has
-nostdinc. As root, I created an alternate Makefile in the
kermel build area etc. So KQEMU has serious defects in the
source tarball, hence my characterization as very hard to install.
This is not the right fix. The sources need fixing, not the
Makefiles.

Why not just fast, instead of *fast?

With KQEMU acceleration, QEMU is actually no faster for emulating
16 bit code, like MSDOS and its applications. MSDOS also spends a
lot of time polling the keyboard, so I saw no decrease in CPU
utilization while the emulation was running. However, when I ran
Linux From Scratch (LFS) from an ISO image on disc, I noticed two
enhancements. First, the CPU was essentially idle (few, 5 or so extra
percent) when the emulated Linux was doing nothing. Second, the
emulation was quite a bit faster. Runing with only a terminal interface
was 182x as fast when accelerated and doing pure CPU (output redirected
to /dev/nul). However, when output was enabled (I computed several
numbers to high precision, for example e = 2.718281828459045...
to like 10,000 digits), it was only 5.6x as fast. Apparently, the
I/O to the screen eats a lot of time.

When I started up X, I found an even greater discrepancy. With
lots of screen I/O the accelerated version was only 1.9x  to 2.7x
as fast as unaccelerated. But, moving windows around and so forth
was noticeably faster and smoother.

As far as pure CPU time, running the same native compiled benchmarks
resulted in QEMU+KQEMU is 2/3 as fast as just running Linux
on my machine. Any screen I/O, however, and the advantage starts going
way down. X in particular eats a *lot* of CPU. I dunno whether
that's because the emulation is having to make other calls to X,
or change the effective screen resolution, or what exactly. So,
for running emulated Linux, at least, KQEMU is definitely worth
it.

However, running freeduc emulated, and running Filets Poisson[1]
resulted in relatively high CPU utilization, though the emulated
machine was definitely smoother and faster. I supose that this
is because Filets Poisson is constantly updating the screen with
moving background fronds etc. waving in the water, and I'm seeing
the screen I/O again.

install:  ease of installation
share:    ease of sharing files between emulation and Linux
speed:    speed of emulation
CPU:      how much CPU does the emulation burn
hardware: emulates other than Intel hardware
soft:     runs all software
events:   supports emulating hardware events

QEMU runs something like 5x to 10x as fast as BOCHS. DOSEMU runs
40x to 50x as fast as QEMU.

BOCHS allows one to emulate various hard drives down to the
level of CHS.


I'd like to see how BOCHS et al. do for running LFS. For 16 bit
code, acceleration of QEMU is not worth the effort of installation.
For other programs, it is definitely worth it. Transferring files
is still a pain.

[1] Filets Poisson is a moving/sliding type puzzle game in which
fish are used to move the objects, hence the name. It has a background
which waves back and forth in the "water".

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!



Reply to: