Slow Performance OSX Host, Ubuntu 9.10 Guest

Discussions related to using VirtualBox on Mac OS X hosts.

Slow Performance OSX Host, Ubuntu 9.10 Guest

Postby otterpop81 » 9. Dec 2009, 06:31

Hello,

I'm comparing performance on VirtualBox and VMWare Fusion on OSX 10.5.7. Since I'm a developer, I'm mostly interested in compile speeds, so that's what I've done my benchmarking with. I use Fox Toolkit a lot, so I make my benchmarks using that. Running "time make" on Fox gives me the following numbers:

VirtualBox 3.0.12:
real 17m4.547s
user 7m51.053s
sys 10m20.815s

VMWare Fusion 3.0.0:
real 9m32.342s
user 3m27.509s
sys 5m48.070s

In playing around with this, I noticed that disk I/O seemed to be the major bottleneck on the VirtualBox side. To Test, I did just a straight dd from /dev/zero to disk as someone on another forum suggested. My results are as follows:

time dd if=/dev/zero of=file bs=1M count=1024

VirtualBox 3.0.12:
real 0m26.4243s
user 0m0.016s
sys 0m3.568s

VMWare Fusion 3.0.0:
real 0m3.678s
user 0m0.016s
sys 0m2.784s

I tried using a fixed-size disk file (in VirtualBox) thinking that may help, but the increase in performance was negligible.

I really like VirtualBox, and Sun Microsystems for that matter for all they do for the community. I'd really like to use this product, but unless I can figure out why this is so slow, I think I'll have to use VMWare. I do feel like I must be doing something wrong, because there's not really a lot of talk on the internet about this. In fact, most postings have VirtualBox's performance on par or better than other VM systems.

For the record, here's the rest of the data that I can think may be relevant:
Host: Mac OS X 10.5.7. MacBook Pro 15", 2.54G Core2Duo, 4G Ram
VirtualBox Setup: 1024MB RAM, ACPI and IO APIC enabled. 2 CPU, PAE/NX enabled. Guest Additions Installed.
VMWare Setup: 1024MB RAM, 2 CPU

Note that switching between 1 and 2 CPUs and switching the other parameters showed negligible effect. I also tried a PAE kernel in Ubuntu with little effect.

If there's something I can try, please let me know.

Thanks,

Alan.
otterpop81
 
Posts: 3
Joined: 9. Dec 2009, 05:25
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Ubuntu 9.10 Windows XP

Re: Slow Performance OSX Host, Ubuntu 9.10 Guest

Postby rpmurray » 9. Dec 2009, 15:24

Have you tried going to Settings > Storage > Hard Disks and enable SATA? According to the VirtualBox manual, pages 75-77, "Like a real SATA controller, VirtualBox's virtual SATA controller operates faster and also consumes less CPU resources than the virtual IDE controller".
rpmurray
Volunteer
 
Posts: 748
Joined: 3. Mar 2009, 00:29
Location: Between Heaven and Hell
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows Server 2003 SP2, Windows XP SP3, Windows 7, Windows Server 2008 R2

Re: Slow Performance OSX Host, Ubuntu 9.10 Guest

Postby otterpop81 » 11. Dec 2009, 02:30

That sounded like a good idea, so I tried it. Especially since VMWare Fusion defaults to a SCSI disk. Unfortunately, I didn't see any improvements. In fact, the dd test performed terribly on the SATA and SCSI. I tried the dd test on the other IDE types as well, and didn't see any improvements. I've included my numbers below.

With the disk set to SCSI (LsiLogic):
FOX build:
real 16m8.206s
user 7m30.380s
sys 9m50.618s

SATA (AHCI):
FOX build:
real 16m19.297s
user 7m35.400s
sys 9m59.301s
dd:
real 5m3.729s
user 0m0.08s
sys 0m1.932s

IDE PIIX4:
dd:
real 0m27.288s
user 0m0.004s
sys 0m2.204s

IDE PIIX3:
dd:
real 0m27.321s
user 0m0.012s
sys 0m3.916s

IDE ICH6:
dd:
real 0m26.909s
user 0m0.012s
sys 0m3.916s
otterpop81
 
Posts: 3
Joined: 9. Dec 2009, 05:25
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Ubuntu 9.10 Windows XP

Re: Slow Performance OSX Host, Ubuntu 9.10 Guest

Postby rpmurray » 11. Dec 2009, 15:48

Just want to make sure of one thing. When you enabled SATA, did you change the Slot from IDE Primary Master to one of the SATA ports down in the Attachments section?
rpmurray
Volunteer
 
Posts: 748
Joined: 3. Mar 2009, 00:29
Location: Between Heaven and Hell
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows Server 2003 SP2, Windows XP SP3, Windows 7, Windows Server 2008 R2

Re: Slow Performance OSX Host, Ubuntu 9.10 Guest

Postby otterpop81 » 14. Dec 2009, 18:49

I did. I changed it to "SATA Port 0"
otterpop81
 
Posts: 3
Joined: 9. Dec 2009, 05:25
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Ubuntu 9.10 Windows XP

Re: Slow Performance OSX Host, Ubuntu 9.10 Guest

Postby Ketzal » 16. Dec 2009, 23:34

Just to mention you're not the only one with this problem : I'm almost exactly in the same situation than you ; compiling in ubuntu 10.4 guest is a pain due to disk. I've gone through all kind of optimizations I could imagine - even the SATA config, and failed to improve the perfs. I didn't use VB for compile intensive tasks for several monthes, but I believe it was not so slow before (around v2.x)
Hopefully some dev will read this post and push the issue in the todo list for next release ...

VirtualBox 3.1
Mac OSX 10.6
4Go RAM
MacBook 2.4G Hz
Ubuntu 10.4 guest
Ketzal
 
Posts: 3
Joined: 24. Dec 2008, 00:16

Re: Slow Performance OSX Host, Ubuntu 9.10 Guest

Postby rpmurray » 16. Dec 2009, 23:49

Ketzal wrote:Hopefully some dev will read this post and push the issue in the todo list for next release ...


Or, instead of just hoping, you can actually make sure the devs see it by creating a ticket in Bugtracker, http://www.virtualbox.org/wiki/Bugtracker
rpmurray
Volunteer
 
Posts: 748
Joined: 3. Mar 2009, 00:29
Location: Between Heaven and Hell
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows Server 2003 SP2, Windows XP SP3, Windows 7, Windows Server 2008 R2


Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: Daterp and 21 guests