From owner-freebsd-emulation@FreeBSD.ORG Mon May 2 12:36:12 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 21C651065672 for ; Mon, 2 May 2011 12:36:12 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9D7708FC17 for ; Mon, 2 May 2011 12:36:11 +0000 (UTC) Received: by eyg7 with SMTP id 7so2205604eyg.13 for ; Mon, 02 May 2011 05:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0KNSeALI0XnbHb8FPbREdfTEv8HEi/glsojChMHuL3g=; b=w2z+JLjtmHTWJf9ag7speOz4CeKBhH1Jpll2Dh4JVebP71oBuAtGUjU6+Nvf1/aF8g ED0jA4cWVS2u3mdVwTJvRKG3p7RrkEa7wQVaHdsryyUCT494CC6+hqkAJHdlzY1eWjDD uqnokFtjMU22iWnz8jzz98DZFWLUtwYR9hzns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=MBJfkFs27y7LcxLb7vQBoEUo+3wcUm1JQCS8rOMdUaGZ2j4mr5ULvwHy5qJ4bqfHgZ tIkYrBwP8BKzkA21kTyBj6vbbTvE+L28JLK7nDT8xhWS6ZWqmC+SIWIua+v3Y+GjQF15 X17ER4EDXyF8Gd+sVsEG8jZBxr1e9kl/2wBsg= MIME-Version: 1.0 Received: by 10.223.54.213 with SMTP id r21mr946722fag.54.1304338196724; Mon, 02 May 2011 05:09:56 -0700 (PDT) Received: by 10.223.20.145 with HTTP; Mon, 2 May 2011 05:09:56 -0700 (PDT) In-Reply-To: <10651953.1304315663013.JavaMail.root@mswamui-blood.atl.sa.earthlink.net> References: <10651953.1304315663013.JavaMail.root@mswamui-blood.atl.sa.earthlink.net> Date: Mon, 2 May 2011 07:09:56 -0500 Message-ID: From: Adam Vande More To: John Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-emulation@freebsd.org 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 12:36:12 -0000 On Mon, May 2, 2011 at 12:54 AM, John wrote: > 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. > Your FreeBSD Host/guest results seem relatively consistent with what I would expect since VM block io isn't really that great yet, however the results in your Linux VM seems too good to be true. Have you tried powering off the Linux VM immediately after the cp exits and md5'ing the two files? This will insure your writes are completing successfully. Also, it may be this type of operation really is faster on your Linux setup, but is it representative of the primary workload? If not, you'll probably want to arrange some type of benchmark that mimics real world IO flows as hypervisor IO performance varies across workloads(example: it used to be true KVM wasn't very good at concurrent IO, not sure if it's better now). You should also ensure caches are not effecting the outcome of consecutive benchmarks runs. umounting and remounting the file system on your SAS controller is the quickest way to do this, but depending on your setup you may need to reboot. If you do want to test with caching involved, you should discard the initial run from your results. Use something like /usr/bin/time to get consistent results of how long operations took. Ensure each setup is running in a minimal configuration so there is less resource contention. Also single runs are a terrible way benchmark things. You *need* multiple runs to ensure accuracy. ministat(1) is a tool in base to help with this. Here is more detail: http://ivoras.sharanet.org/blog/tree/2009-12-02.using-ministat.html http://lists.freebsd.org/pipermail/freebsd-current/2011-March/023435.html -- Adam Vande More