From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: Re: virtio performance issue Date: Wed, 17 Sep 2008 11:49:42 +0100 Message-ID: <1221648582.7508.20.camel@blaa> References: <1221574441.26630.19.camel@cluwyn.haifa.ibm.com> <48CFBFC6.4040405@us.ibm.com> <1221593080.26630.28.camel@cluwyn.haifa.ibm.com> Reply-To: Mark McLoughlin Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , kvm@vger.kernel.org, Muli Ben-Yehuda To: Ben-Ami Yassour Return-path: Received: from mx2.redhat.com ([66.187.237.31]:57390 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753484AbYIQKxN (ORCPT ); Wed, 17 Sep 2008 06:53:13 -0400 In-Reply-To: <1221593080.26630.28.camel@cluwyn.haifa.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2008-09-16 at 22:24 +0300, Ben-Ami Yassour wrote: > On Tue, 2008-09-16 at 09:16 -0500, Anthony Liguori wrote: > > Ben-Ami Yassour wrote: > > > I am running virtio with the latest KVM code, and see a significant > > > performance issue. > > > > > > Ping to the host (or any other close machine) reports a 4ms delay. > > > > > > > What kvm version and what host kernel version? > > > > It's very easy to mistakenly compile qemu without GSO support too. You > > have to make sure that the 2.6.27 if_tun.h is being included by QEMU. > > Is there an option to control GSO support? How? GSO support is unconditionally enabled with model=virtio if kvm-userspace is built with the correct kernel headers, the host kernel supports tun/tap's IFF_VNET_HDR extension and if the guest supports GSO. > I am using the kernel and userspace that I pulled from the kvm tree > today. > > Based on your comment, we checked and the build of the userspace does > not take if_tun.h from the kernel tree, it takes it from the system > include files. > The reason was that the file was not copied as part of the userspace > build. > > To fix this we made the following change: > diff --git a/kernel/Makefile b/kernel/Makefile > index 3f5f6da..b81b098 100644 > --- a/kernel/Makefile > +++ b/kernel/Makefile > @@ -53,7 +53,7 @@ T = $(subst -sync,,$@)-tmp > header-sync: > rm -rf $T > rsync -R \ > - "$(LINUX)"/./include/linux/kvm*.h \ > + "$(LINUX)"/./include/linux/*.h \ > "$(LINUX)"/./include/asm-*/kvm*.h \ Ouch, looks like we need a fix like this alright - maybe just copy if_tun.h and virtio*.h ? > Even with this change and compiling the userspace with the correct > if_tun.h the results are the same, ping takes 4ms. GSO shouldn't affect ping latency - it should only affect throughput. I'd expect ping latency to be in the range of .15ms and .3ms since we delay our reply for .15ms currently. Is this a regression? Have you tried bisecting it? Cheers, Mark.