Virtual make build

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
cpu0: Virtual CPU   (686-class) 310 MHz
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
;; reply from unexpected source:, expected
;; reply from unexpected source:, expected
;; 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 ‘named_flags=""’ to /etc/rc.conf.local and make dhclient(8) prepend the local nameserver to resolv.conf(5) by adding the following to dhclient.conf(5):

prepend domain-name-servers;

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.

Now that Apple use Intel chipsets I sure hope VMWare will port their stuff to Mac OS X soon. I would buy it, even download it for free if that's what it takes. Are you listening, VMWare?