All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: Ben-Ami Yassour <benami@il.ibm.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	kvm@vger.kernel.org, Muli Ben-Yehuda <MULI@il.ibm.com>
Subject: Re: virtio performance issue
Date: Wed, 17 Sep 2008 11:49:42 +0100	[thread overview]
Message-ID: <1221648582.7508.20.camel@blaa> (raw)
In-Reply-To: <1221593080.26630.28.camel@cluwyn.haifa.ibm.com>

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.


  reply	other threads:[~2008-09-17 10:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 14:14 virtio performance issue Ben-Ami Yassour
2008-09-16 14:16 ` Anthony Liguori
2008-09-16 19:24   ` Ben-Ami Yassour
2008-09-17 10:49     ` Mark McLoughlin [this message]
2008-09-17 12:10       ` Ben-Ami Yassour
2008-09-16 17:43 ` Bernhard Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1221648582.7508.20.camel@blaa \
    --to=markmc@redhat.com \
    --cc=MULI@il.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=benami@il.ibm.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.