From owner-freebsd-emulation@FreeBSD.ORG Mon May 2 05:54:24 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EDAA106566B for ; Mon, 2 May 2011 05:54:24 +0000 (UTC) (envelope-from aqqa11@earthlink.net) Received: from elasmtp-scoter.atl.sa.earthlink.net (elasmtp-scoter.atl.sa.earthlink.net [209.86.89.67]) by mx1.freebsd.org (Postfix) with ESMTP id DB05A8FC12 for ; Mon, 2 May 2011 05:54:23 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=qwgvaBpnWbxTZ0LGTXDeFZPnZa7tOq9j2T9YRaV7riPcztgiQas9FKjHM5wBpajM; h=Message-ID:Date:From:Reply-To:To:Subject:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [209.86.224.28] (helo=mswamui-blood.atl.sa.earthlink.net) by elasmtp-scoter.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1QGm5P-0003g4-9w for freebsd-emulation@freebsd.org; Mon, 02 May 2011 01:54:23 -0400 Received: from 96.242.250.147 by webmail.earthlink.net with HTTP; Mon, 2 May 2011 01:54:22 -0400 Message-ID: <10651953.1304315663013.JavaMail.root@mswamui-blood.atl.sa.earthlink.net> Date: Mon, 2 May 2011 01:54:22 -0400 (EDT) From: John To: freebsd-emulation@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: EarthLink Zoo Mail 1.0 X-ELNK-Trace: 2552ff5019365d7e94f5150ab1c16ac02930b881f11d255efb643ccd5417debb5b975860f99a21d0350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 209.86.224.28 Subject: Re: virtualbox I/O 3 times slower than KVM? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 05:54:24 -0000 -----Original Message----- >From: Ted Mittelstaedt > >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