I wanted to install OpenBSD in Virtual PC 7 on my 1.67 GHz G4/1.5 GB PowerBook, so I installed a snapshot on a simple Virtual PC with 256 MB of memory and made a CVS checkout of the source tree and started building, just to get a feel of how fast it would be.
The start of the dmesg(8) says this, after having built my own kernel:
OpenBSD 3.9-current (GENERIC) #0: Wed Mar 22 10:15:36 UTC 2006 firstname.lastname@example.org:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Virtual CPU (686-class) 310 MHz cpu0: FPU,V86,PSE,TSC,MSR,PAE,MCE,CX8,PGE,CMOV,MMX real mem = 268017664 (261736K) avail mem = 237568000 (232000K)
Not too fast, but usable, a
make build should be done in a
nights sleep or so, right? Wrong!
Time said it took 2 days, 14 hours, 9 minutes and 48.24 seconds!
About 14% of the time spent in
user, 75% in
sys, and I have no idea what the remainder is.
I did use the computer for other things while the build ran, and most of the time the Virtual PC was backgrounded and set to use only about 75% of the CPU then, but I'm pretty sure the performance is disk-bound, not CPU bound.
Apart from the obvious slowness of Virtual PC, its network virtualization leaves a lot to be desired. It can only run the network in bridged mode on the “wired” interface which I virtually never use, so I have to resort to NAT mode and use the built-in virtual DHCP and nameserver, which is severely broken, behold:
<m@xxx:/home/m:14>$ host miracle.mongers.org 192.168.131.252 ;; reply from unexpected source: 192.168.131.254#53, expected 192.168.131.252#53 ;; reply from unexpected source: 192.168.131.254#53, expected 192.168.131.252#53 ;; connection timed out; no servers could be reached
Not funny. During installation I had to enter the raw IP address to fetch the installation files, making the lookup manually from the host OS.
The solution is of course to run a local nameserver by adding
and make dhclient(8)
prepend the local nameserver to resolv.conf(5)
by adding the following to dhclient.conf(5):
prepend domain-name-servers 127.0.0.1;
And that's probably the best you can do with Virtual PC and OpenBSD. Not something you can use for serious development and testing, it's simply too slow.