From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: bad virtio disk performance Date: Tue, 28 Apr 2009 14:55:42 +0300 Message-ID: <49F6EEBE.6030601@redhat.com> References: <20090427151204.GA16943@xanadu.blop.info> <49F5ED05.6020703@third-harmonic.com> <20090427182830.GA32574@xanadu.blop.info> <49F6425B.6010000@redhat.com> <20090428105609.GA8847@xanadu.blop.info> <20090428114849.GA12268@xanadu.blop.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: john cooper , john cooper , kvm@vger.kernel.org To: Lucas Nussbaum Return-path: Received: from mx2.redhat.com ([66.187.237.31]:50985 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761022AbZD1LzL (ORCPT ); Tue, 28 Apr 2009 07:55:11 -0400 In-Reply-To: <20090428114849.GA12268@xanadu.blop.info> Sender: kvm-owner@vger.kernel.org List-ID: Lucas Nussbaum wrote: > On 28/04/09 at 12:56 +0200, Lucas Nussbaum wrote: > >> I then upgraded to kvm-85 (both the host kernel modules and the >> userspace), and re-ran the tests. Performance is better (about 85 MB/s), >> but still very far from the non-virtio case. >> > > I forgot to mention that the strangest result I got was the total amount > of write blocks queued (as measured by blktrace). I was writing a 1 GB > file to disk, which resulted in: > > - 1 GB of write blocks queued without virtio > - ~1.7 GB of write blocks queued with virtio on kvm 84 > - ~1.4 GB of write blocks queued with virtio on kvm 85 > > I don't understand with kvm with virtio writes "more blocks than > necessary", but that could explain the performance difference. > Are these numbers repeatable? Try increasing the virtio queue depth. See the call to virtio_add_queue() in qemu/hw/virtio-blk.c. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.