public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Avi Kivity <avi@qumranet.com>
Cc: Mark McLoughlin <markmc@redhat.com>,
	kvm@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH 0/9][RFC] KVM virtio_net performance
Date: Sun, 27 Jul 2008 16:48:00 +1000	[thread overview]
Message-ID: <200807271648.00438.rusty@rustcorp.com.au> (raw)
In-Reply-To: <488AF240.2060208@qumranet.com>

On Saturday 26 July 2008 19:45:36 Avi Kivity wrote:
> Mark McLoughlin wrote:
> > Hey,
> >       Here's a bunch of patches attempting to improve the performance
> > of virtio_net. This is more an RFC rather than a patch submission
> > since, as can be seen below, not all patches actually improve the
> > perfomance measurably.
> >
> >       I've tried hard to test each of these patches with as stable and
> > informative a benchmark as I could find. The first benchmark is a
> > netperf[1] based throughput benchmark and the second uses a flood
> > ping[2] to measure latency differences.
> >
> >       Each set of figures is min/average/max/standard deviation. The
> > first set is Gb/s and the second is milliseconds.
> >
> >       The network configuration used was very simple - the guest with
> > a virtio_net interface and the host with a tap interface and static
> > IP addresses assigned to both - e.g. there was no bridge in the host
> > involved and iptables was disable in both the host and guest.
> >
> >       I used:
> >
> >   1) kvm-71-26-g6152996 with the patches that follow
> >
> >   2) Linus's v2.6.26-5752-g93ded9b with Rusty's virtio patches from
> >      219:bbd2611289c5 applied; these are the patches have just been
> >      submitted to Linus
> >
> >       The conclusions I draw are:
> >
> >   1) The length of the tx mitigation timer makes quite a difference to
> >      throughput achieved; we probably need a good heuristic for
> >      adjusting this on the fly.
>
> The tx mitigation timer is just one part of the equation; the other is
> the virtio ring window size, which is now fixed.
>
> Using a maximum sized window is good when the guest and host are running
> flat out, doing nothing but networking.  When throughput drops (because
> the guest is spending cpu on processing, or simply because the other
> side is not keeping up), we need to drop the windows size so as to
> retain acceptable latencies.
>
> The tx timer can then be set to "a bit after the end of the window",
> acting as a safety belt in case the throughput changes.

Interestingly, I played a little with a threshold patch.  Unfortunately it 
seemed to just add YA variable to the mix; it'd take real research to figure 
out how to adjust the threshold and timeout values appropriately for 
different situations.

> This isn't too good.  Low latency is important for nfs clients (or other
> request/response workloads).  I think we can keep these low by adjusting
> the virtio window (for example, on an idle system it should be 1), so
> that the tx mitigation timer only fires when the workload transitions
> from throughput to request/response.

>From reading this thread, this seems like an implementation bug.  Don't 
suppress notifications on an empty ring (ie. threshold will be 1 when nothing 
is happening).

Rusty.

  reply	other threads:[~2008-07-27  6:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24 11:46 [PATCH 0/9][RFC] KVM virtio_net performance Mark McLoughlin
2008-07-24 11:46 ` [PATCH 1/9] kvm: qemu: Set MIN_TIMER_REARM_US to 150us Mark McLoughlin
2008-07-24 11:46   ` [PATCH 2/9] kvm: qemu: Fix virtio_net tx timer Mark McLoughlin
2008-07-24 11:46     ` [PATCH 3/9] kvm: qemu: Remove virtio_net tx ring-full heuristic Mark McLoughlin
2008-07-24 11:46       ` [PATCH 4/9] kvm: qemu: Add VIRTIO_F_NOTIFY_ON_EMPTY Mark McLoughlin
2008-07-24 11:46         ` [PATCH 5/9] kvm: qemu: Disable recv notifications until avail buffers exhausted Mark McLoughlin
2008-07-24 11:46           ` [PATCH 6/9] kvm: qemu: Add support for partial csums and GSO Mark McLoughlin
2008-07-24 11:46             ` [PATCH 7/9] kvm: qemu: Increase size of virtio_net rings Mark McLoughlin
2008-07-24 11:46               ` [PATCH 8/9] kvm: qemu: Drop the mutex while reading from tapfd Mark McLoughlin
2008-07-24 11:46                 ` [PATCH 9/9] kvm: qemu: Eliminate extra virtio_net copy Mark McLoughlin
2008-07-24 23:33                 ` [PATCH 8/9] kvm: qemu: Drop the mutex while reading from tapfd Dor Laor
2008-07-25 17:25                   ` Mark McLoughlin
2008-07-24 23:22       ` [PATCH 3/9] kvm: qemu: Remove virtio_net tx ring-full heuristic Dor Laor
2008-07-25  0:30         ` Rusty Russell
2008-07-25 17:30           ` Mark McLoughlin
2008-07-25 17:23         ` Mark McLoughlin
2008-07-24 23:56       ` Dor Laor
2008-07-26  9:48     ` [PATCH 2/9] kvm: qemu: Fix virtio_net tx timer Avi Kivity
2008-07-26 12:08       ` Mark McLoughlin
2008-07-24 11:55 ` [PATCH 0/9][RFC] KVM virtio_net performance Herbert Xu
2008-07-24 16:53 ` Mark McLoughlin
2008-07-24 18:29   ` Anthony Liguori
2008-07-25 16:36     ` Mark McLoughlin
2008-07-24 20:56 ` Anthony Liguori
2008-07-25 17:17   ` Mark McLoughlin
2008-07-25 21:29     ` Dor Laor
2008-07-26 19:09   ` Bill Davidsen
2008-07-27  7:52     ` Avi Kivity
2008-07-27 12:52       ` Bill Davidsen
2008-07-27 13:17       ` Bill Davidsen
2008-07-28  6:42         ` Mark McLoughlin
2008-07-26  9:45 ` Avi Kivity
2008-07-27  6:48   ` Rusty Russell [this message]
2008-07-27  6:48   ` Rusty Russell
2008-08-11 19:56   ` Mark McLoughlin
2008-08-12 13:35     ` Avi Kivity

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=200807271648.00438.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=avi@qumranet.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kvm@vger.kernel.org \
    --cc=markmc@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox