From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60095 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHGJd-0004ch-L6 for qemu-devel@nongnu.org; Wed, 26 May 2010 09:06:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHGJY-0008H2-ES for qemu-devel@nongnu.org; Wed, 26 May 2010 09:06:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2099) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHGJY-0008Gu-6l for qemu-devel@nongnu.org; Wed, 26 May 2010 09:06:28 -0400 Message-ID: <4BFD1CC7.4080807@redhat.com> Date: Wed, 26 May 2010 16:06:15 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Add cache=volatile parameter to -drive References: <1274091292-4812-1-git-send-email-agraf@suse.de> <4BF13D5E.8090006@codemonkey.ws> In-Reply-To: <4BF13D5E.8090006@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kwolf@redhat.com, hch@lst.de, Alexander Graf , qemu-devel@nongnu.org On 05/17/2010 03:58 PM, Anthony Liguori wrote: > On 05/17/2010 05:14 AM, Alexander Graf wrote: >> Usually the guest can tell the host to flush data to disk. In some >> cases we >> don't want to flush though, but try to keep everything in cache. >> >> So let's add a new cache value to -drive that allows us to set the cache >> policy to most aggressive, disabling flushes. We call this mode >> "volatile", >> as guest data is not guaranteed to survive host crashes anymore. >> >> This patch also adds a noop function for aio, so we can do nothing in >> AIO >> fashion. >> >> Signed-off-by: Alexander Graf > > I'd like to see some performance data with at least an ext3 host file > system and an ext4 file system. > > My concern is that ext3 exaggerates the cost of fsync() which will > result in diminishing value over time for this feature as people move > to ext4/btrfs. > In fact, btrfs is currently unusable for virt because O_SYNC writes inflate a guest write to a host write. by a huge factor (50x-100x). cache=writethrough is 100% unusable, cache=writeback is barely tolerable. As of 2.6.32, cache=volatile is probably required to get something resembling reasonable performance on btrfs. Of course, we expect that btrfs will improve in time, but still it doesn't seem to be fsync friendly. -- error compiling committee.c: too many arguments to function