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 15:18:47 -0600 [thread overview]
Message-ID: <1303766327.3431.100.camel@x201> (raw)
In-Reply-To: <4DB5E434.1040708@gmail.com>
On Mon, 2011-04-25 at 15:14 -0600, David Ahern wrote:
>
> On 04/25/11 15:02, Alex Williamson wrote:
> > On Mon, 2011-04-25 at 14:40 -0600, David Ahern wrote:
> >>
> >> On 04/25/11 14:27, Alex Williamson wrote:
> >>> On Mon, 2011-04-25 at 13:49 -0600, David Ahern wrote:
> >>>>
> >>>> On 04/25/11 13:29, Alex Williamson wrote:
> >>>>> 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
> >>>>
> >>>> For host-to-VM using VFs is worse than virtio which is counterintuitive.
> >>>
> >>> On the same host, just think about the data path of one versus the
> >>> other. On the guest side, there's virtio vs a physical NIC. virtio is
> >>> designed to be virtualization friendly, so hopefully has less context
> >>> switches in setting up and processing transactions. Once the packet
> >>> leaves the assigned physical NIC, it has to come back up the entire host
> >>> I/O stack, while the virtio device is connected to an internal bridge
> >>> and bypasses all but the upper level network routing.
> >>
> >> I get the virtio path, but you lost me on the physical NIC. I thought
> >> the point of VFs is to bypass the host from having to touch the packet,
> >> so the processing path with a VM using a VF would be the same as a non-VM.
> >
> > In the VF case, the host is only involved in processing the packet on
> > it's end of the connection, but the packet still has to go all the way
> > out to the physical device and all the way back. Handled on one end by
> > the VM and the other end by the host.
> >
> > An analogy might be sending a letter to an office coworker in a
> > neighboring cube. You could just pass the letter over the wall (virtio)
> > or you could go put it in the mailbox, signal the mail carrier, who
> > comes and moves it to your neighbor's mailbox, who then gets signaled
> > that they have a letter (device assignment).
> >
> > Since the networks stacks are completely separate from one another,
> > there's very little difference in data path whether you're talking to
> > the host, a remote system, or a remote VM, which is reflected in your
> > performance data. Hope that helps,
>
> Got you. I was thinking host-VM as VM on separate host; I didn't make
> that clear. Thanks for clarifying - I like the letter example.
I should probably also note that being able to "pass a letter over the
wall" is possible because of the bridge/tap setup used for that
communication path, so it's available to emulated NICs as well. virtio
is just a paravirtualization layer that makes it lower overhead than
emulation. To get a letter "out of the office" (ie. off host), all
paths still eventually need to put the letter in the mailbox. Thanks,
Alex
next prev parent reply other threads:[~2011-04-25 21:18 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
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 [this message]
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=1303766327.3431.100.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