From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: sync guest calls made async on host - SQLite performance Date: Tue, 13 Oct 2009 18:08:51 -0500 Message-ID: <4AD50883.1040305@codemonkey.ws> References: <4ABC6AA5.6080909@tauceti.net> <4AC259DC.2080807@codemonkey.ws> <4AC260BB.3090906@gmail.com> <4AC27355.3090303@codemonkey.ws> <4ACCC7A1.9060303@gmail.com> <4ACCEC9F.7090309@gmail.com> <4ACE0196.9010904@gmail.com> <4ACF89CB.5020406@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Dustin Kirkland , Avi Kivity , RW , kvm@vger.kernel.org To: Matthew Tippett Return-path: Received: from mail-ew0-f208.google.com ([209.85.219.208]:41894 "EHLO mail-ew0-f208.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbZJMXJg (ORCPT ); Tue, 13 Oct 2009 19:09:36 -0400 Received: by ewy4 with SMTP id 4so3922089ewy.37 for ; Tue, 13 Oct 2009 16:08:59 -0700 (PDT) In-Reply-To: <4ACF89CB.5020406@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Matthew Tippett wrote: > Thanks Duncan for reproducing the behavior outside myself and Phoronix. > > I dug deeper into the actual syscalls being made by sqlite. The > salient part of the behaviour is small sequential writes followed by a > fdatasync (effectively a metadata-free fsync). > > As Dustin indicates, > > if scsi is used, you incur the cost of virtualization, > if virtio is used, your guests fsyncs incur less cost. > > So back to the question to the kvm team. It appears that with the > stock KVM setup customers who need higher data integrity (through > fsync) should steer away from virtio for the moment. > > Is that assessment correct? No, it's an absurd assessment. You have additional layers of caching happening because you're running a guest from a filesystem on the host. A benchmark running under a guest that happens do be faster than the host does not indicate anything. It could be that the benchmark is poorly written. What operation, specifically, do you think is not behaving properly under kvm? ext4 (karmic's default filesystem) does not enable barriers by default so it's unlikely this is anything barrier related. > Regards, > > Matthew Regards, Anthony Liguori