Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: KVM mailing list <kvm@vger.kernel.org>
Subject: Re: performance of virtual functions compared to virtio
Date: Mon, 25 Apr 2011 13:29:33 -0600	[thread overview]
Message-ID: <1303759773.3431.64.camel@x201> (raw)
In-Reply-To: <4DB5C65C.20306@gmail.com>

On Mon, 2011-04-25 at 13:07 -0600, David Ahern wrote:
> On 04/25/11 12:13, Alex Williamson wrote:
> >> So, basically, 192.168.102 is the network where the VMs have a VF, and
> >> 192.168.103 is the network where the VMs use virtio for networking.
> >>
> >> The netperf commands are all run on either Host-A or VM-C:
> >>
> >>   netperf -H $ip -jcC -v 2 -t TCP_RR      -- -r 1024 -D L,R
> >>   netperf -H $ip -jcC -v 2 -t TCP_STREAM  -- -m 1024 -D L,R
> >>
> >>
> >>                    latency      throughput
> >>                     (usec)         Mbps
> >> cross-host:
> >>   A-B, eth2          185            932
> >>   A-B, eth3          185            935
> > 
> > This is actually PF-PF, right?  It would be interesting to load igbvf on
> > the hosts and determine VF-VF latency as well.
> 
> yes, PF-PF. eth3 has the added bridge layer, but from what I can see the
> overhead is noise. I added host-to-host to put the host-to-VM numbers in
> perspective.
> 
> > 
> >> same host, host-VM:
> >>   A-C, using VF      488           1085 (seen as high as 1280's)
> >>   A-C, virtio        150           4282
> > 
> > We know virtio has a shorter path for this test.
> 
> No complaints about the throughput numbers; the latency is the problem.
> 
> > 
> >> cross-host, host-VM:
> >>   A-D, VF            489            938
> >>   A-D, virtio        288            889
> >>
> >> cross-host, VM-VM:
> >>   C-D, VF            488            934
> >>   C-D, virtio        490            933
> >>
> >>
> >> While throughput for VFs is fine (near line-rate when crossing hosts),
> > 
> > FWIW, it's not too difficult to get line rate on a 1Gbps network, even
> > some of the emulated NICs can do it.  There will be a difference in host
> > CPU power to get it though, where it should theoretically be emulated >
> > virtio > pci-assign.
> 
> 10GB is the goal; 1GB offers a cheaper learning environment. ;-)
> 
> > 
> >> the latency is horrible. Any options to improve that?
> > 
> > If you don't mind testing, I'd like to see VF-VF between the hosts (to
> > do this, don't assign eth2 an IP, just make sure it's up, then load the
> > igbvf driver on the host and assign an IP to one of the VFs associated
> > with the eth2 PF), and cross host testing using the PF for the guest
> > instead of the VF.  This should help narrow down how much of the latency
> > is due to using the VF vs the PF, since all of the virtio tests are
> > using the PF.  I've been suspicious that the VF adds some latency, but
> > haven't had a good test setup (or time) to dig very deep into it.
> 
> It's a quad nic, so I left eth2 and eth3 alone and added the VF-VF test
> using VFs on eth4.
> 
> Indeed latency is 488 usec and throughput is 925 Mbps. This is
> host-to-host using VFs.

So we're effectively getting host-host latency/throughput for the VF,
it's just that in the 82576 implementation of SR-IOV, the VF takes a
latency hit that puts it pretty close to virtio.  Unfortunate.  I think
you'll find that passing the PF to the guests should be pretty close to
that 185us latency.  I would assume (hope) the higher end NICs reduce
this, but it seems to be a hardware limitation, so it's hard to predict.
Thanks,

Alex


  reply	other threads:[~2011-04-25 19:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  1:57 performance of virtual functions compared to virtio David Ahern
2011-04-21  2:35 ` Alex Williamson
2011-04-21  8:07   ` Avi Kivity
2011-04-21 12:31     ` Stefan Hajnoczi
2011-04-21 13:09       ` Avi Kivity
2011-04-25 17:49         ` David Ahern
2011-04-26  8:19           ` Avi Kivity
2011-04-27 21:13             ` David Ahern
2011-04-28  8:07               ` Avi Kivity
2011-04-25 17:46     ` David Ahern
2011-04-26  8:20       ` Avi Kivity
2011-04-25 17:39   ` David Ahern
2011-04-25 18:13     ` Alex Williamson
2011-04-25 19:07       ` David Ahern
2011-04-25 19:29         ` Alex Williamson [this message]
2011-04-25 19:49           ` David Ahern
2011-04-25 20:27             ` Alex Williamson
2011-04-25 20:40               ` David Ahern
2011-04-25 21:02                 ` Alex Williamson
2011-04-25 21:14                   ` David Ahern
2011-04-25 21:18                     ` Alex Williamson
2011-04-25 20:49             ` Andrew Theurer
2011-05-02 18:58         ` David Ahern

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=1303759773.3431.64.camel@x201 \
    --to=alex.williamson@redhat.com \
    --cc=dsahern@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox