From owner-freebsd-emulation@FreeBSD.ORG Mon May 2 11:23:35 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 976101065676 for ; Mon, 2 May 2011 11:23:35 +0000 (UTC) (envelope-from tedm@mittelstaedt.us) Received: from mail.freebsd-corp-net-guide.com (mail.freebsd-corp-net-guide.com [65.75.192.90]) by mx1.freebsd.org (Postfix) with ESMTP id 265C18FC0A for ; Mon, 2 May 2011 11:23:34 +0000 (UTC) Received: from [192.168.1.64] (nat-rtr.freebsd-corp-net-guide.com [65.75.197.130]) by mail.freebsd-corp-net-guide.com (8.14.4/8.14.4) with ESMTP id p42BNUjr017187 for ; Mon, 2 May 2011 04:23:30 -0700 (PDT) (envelope-from tedm@mittelstaedt.us) Message-ID: <4DBE9434.1090201@mittelstaedt.us> Date: Mon, 02 May 2011 04:23:32 -0700 From: Ted Mittelstaedt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-emulation@freebsd.org References: <10651953.1304315663013.JavaMail.root@mswamui-blood.atl.sa.earthlink.net> In-Reply-To: <10651953.1304315663013.JavaMail.root@mswamui-blood.atl.sa.earthlink.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=4.1 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.freebsd-corp-net-guide.com Subject: Re: virtualbox I/O 3 times slower than KVM? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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 11:23:35 -0000 On 5/1/2011 10:54 PM, John wrote: > > -----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. did you try mounting the filesystem that the virtualbox is writing to, async? what is the contents of the freebsd host /etc/fstab? Ted > > Thanks, John > > _______________________________________________ > freebsd-emulation@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To > unsubscribe, send any mail to > "freebsd-emulation-unsubscribe@freebsd.org"