Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 May 2011 01:54:22 -0400 (EDT)
From:      John <aqqa11@earthlink.net>
To:        freebsd-emulation@freebsd.org
Subject:   Re: virtualbox I/O 3 times slower than KVM?
Message-ID:  <10651953.1304315663013.JavaMail.root@mswamui-blood.atl.sa.earthlink.net>

next in thread | raw e-mail | index | archive | help

-----Original Message-----
>From: Ted Mittelstaedt <tedm@mittelstaedt.us>
>
>On 4/30/2011 7:28 PM, typo W wrote:
>> Hi, I'm brand new to virtualbox, so pardon me in case I made stupid
>> mistakes.  I created a FreeBSD guest out of the regular virtualbox
>> port (3.2.12) on FreeBSD 8.2, then timed the copying of a 320MB
>> binary file to another file, which took 4 seconds, ie, 80MB/s.  On an
>> identical hardware I created a CentOS guest out of KVM running on
>> CentOS, and the same operation only takes 1 second.  On both hosts,
>> the copy takes 1 second.  That is, virtualbox slowed the copying to
>> 1/4 speed on my guest FreeBSD.
>>
>> Both hosts are Dell R710, with 6 x 600GB 15K SAS drives forming a
>> RAID6 with R700 controller with 512MB cache.
>>
>
>Try some file copies at the base OS and let us know the results.
>
>I would guess that the FreeBSD hardware RAID device driver for
>the R700 controller isn't using the hardware write caching of
>the controller.  When the FreeBSD host OS got the file write
>call from the virtual box it should have issued the write to the
>disk controller and then returned immediately since the write should
>have gone into the hardware cache of the controller.
>
>you can also try playing with the sync/async options in the host OS. 
>See the mount command for details.  it is kind of pointless to do
>sync writes on a caching hardware controller because the entire
>point of sync writes is to keep the data from being scrambled
>in a crash or if there is sudden power loss - but the cache in the 
>hardware array card is more than capable of screwing the filesystem
>if that happens.
>
>Ted
>
>

On both the FreeBSD host and the CentOS host, the copying only takes 1 second, as tested before.  Actually, the classic "dd" test is slightly faster on the FreeBSD host than on the CentOS host.

The storage I chose for the virtualbox guest is a SAS controller.  I found by default it did not enable "Use Host I/O Cache".  I just enabled that and rebooted the guest.  Now the copying on the guest takes 3 seconds.  Still, that's clearly slower than 1 second.

Any other things I can try?  I love FreeBSD and hope we can sort this out. 

Thanks, John




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10651953.1304315663013.JavaMail.root>