All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Zoltan Kiss <zoltan.kiss@linaro.org>
Cc: "Zhangleiqiang (Trump)" <zhangleiqiang@huawei.com>,
	jonathan.davies@citrix.com,
	"Luohao (brian)" <brian.luohao@huawei.com>,
	Zhuangyuxin <zhuangyuxin@huawei.com>,
	zhangleiqiang <zhangleiqiang@gmail.com>,
	"Yuzhou (C)" <vitas.yuzhou@huawei.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"Xiaoding (B)" <xiaoding1@huawei.com>
Subject: Re: Poor network performance between DomU with multiqueue support
Date: Fri, 5 Dec 2014 13:27:02 -0500	[thread overview]
Message-ID: <20141205182702.GA4754@laptop.dumpdata.com> (raw)
In-Reply-To: <5481CD57.607@linaro.org>

On Fri, Dec 05, 2014 at 03:20:55PM +0000, Zoltan Kiss wrote:
> 
> 
> On 04/12/14 14:31, Zhangleiqiang (Trump) wrote:
> >>-----Original Message-----
> >>From: Zoltan Kiss [mailto:zoltan.kiss@linaro.org]
> >>Sent: Thursday, December 04, 2014 9:35 PM
> >>To: Zhangleiqiang (Trump); Wei Liu; xen-devel@lists.xen.org
> >>Cc: Xiaoding (B); Zhuangyuxin; zhangleiqiang; Luohao (brian); Yuzhou (C)
> >>Subject: Re: [Xen-devel] Poor network performance between DomU with
> >>multiqueue support
> >>
> >>
> >>
> >>On 04/12/14 12:09, Zhangleiqiang (Trump) wrote:
> >>>>I think that's expected, because guest RX data path still uses
> >>>>grant_copy while
> >>>>>guest TX uses grant_map to do zero-copy transmit.
> >>>As I understand, the RX process is as follows:
> >>>1. Phy NIC receive packet
> >>>2. XEN Hypervisor trigger interrupt to Dom0 3. Dom0' s NIC driver do
> >>>the "RX" operation, and the packet is stored into SKB which is also
> >>>owned/shared with netback
> >>Not that easy. There is something between the NIC driver and netback which
> >>directs the packets, e.g. the old bridge driver, ovs, or the IP stack of the kernel.
> >>>4. NetBack notify netfront through event channel that a packet is
> >>>receiving 5. Netfront grant a buffer for receiving and notify netback
> >>>the GR (if using grant-resue mechanism, netfront just notify the GR to
> >>>netback) through IO Ring
> >>It looks a bit confusing in the code, but netfront put "requests" on the ring
> >>buffer, which contains the grant ref of the guest page where the backend can
> >>copy. When the packet comes, netback consumes these requests and send
> >>back a response telling the guest the grant copy of the packet finished, it can
> >>start handling the data. (sending a response means it's placing a response in
> >>the ring and trigger the event channel) And ideally netback should always have
> >>requests in the ring, so it doesn't have to wait for the guest to fill it up.
> >
> >>>6. NetBack do the grant_copy to copy packet from its SKB to the buffer
> >>>referenced by GR, and notify netfront through event channel 7.
> >>>Netfront copy the data from buffer to user-level app's SKB
> >>Or wherever that SKB should go, yes. Like with any received packet on a real
> >>network interface.
> >>>
> >>>Am I right? Why not using zero-copy transmit in guest RX data pash too ?
> >>Because that means you are mapping that memory to the guest, and you won't
> >>have any guarantee when the guest will release them. And netback can't just
> >>unmap them forcibly after a timeout, because finding a correct timeout value
> >>would be quite impossible.
> >>A malicious/buggy/overloaded guest can hold on to Dom0 memory indefinitely,
> >>but it even becomes worse if the memory came from another
> >>guest: you can't shutdown that guest for example, until all its memory is
> >>returned to him.
> >
> >Thanks for your detailed explanation about RX data path, I have get it, :)
> >
> >About the issue that poor performance between DomU to DomU, but high throughout between Dom0 to remote Dom0/DomU mentioned in my previous mail, do you have any idea about it?
> >
> >I am wondering if netfront/netback can be optimized to reach the 10Gbps throughout between DomUs running on different hosts connected with 10GE network. Currently, it seems like the TX is not the bottleneck, because we can reach the aggregate throughout of 9Gbps when sending packets from one DomU to other 3 DomUs running on different host. So I think the bottleneck maybe the RX, are you agreed with me?
> >
> >I am wondering what is the main reason that prevent RX to reach the higher throughout? Compared to KVM+virtio+vhost, which can reach high throughout, the RX has extra grantcopy operation, and the grantcopy operation may be one reason for it. Do you have any idea about it too?
> It's quite sure that the grant copy is the bottleneck for a single queue RX
> traffic. I don't know what's the plan to help that, currently only a faster
> CPU can help you with that.

Could the Intel QuickData help with that?
> 
> >
> >>
> >>Regards,
> >>
> >>Zoli
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2014-12-05 18:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02  8:30 Poor network performance between DomU with multiqueue support zhangleiqiang
2014-12-02 10:57 ` David Vrabel
2014-12-02 11:53   ` Zhangleiqiang (Trump)
2014-12-02 17:25     ` Zoltan Kiss
2014-12-02 11:01 ` Wei Liu
2014-12-02 11:50   ` Zhangleiqiang (Trump)
2014-12-02 12:11     ` Wei Liu
2014-12-02 14:46       ` Zhangleiqiang (Trump)
2014-12-02 15:58         ` Wei Liu
2014-12-03 14:43           ` Zhangleiqiang (Trump)
2014-12-04 10:50             ` Wei Liu
2014-12-04 12:09               ` Zhangleiqiang (Trump)
2014-12-04 13:05                 ` Wei Liu
2014-12-04 14:37                   ` Zhangleiqiang (Trump)
2014-12-04 13:35                 ` Zoltan Kiss
2014-12-04 14:31                   ` Zhangleiqiang (Trump)
2014-12-05 15:20                     ` Zoltan Kiss
2014-12-05 18:27                       ` Konrad Rzeszutek Wilk [this message]
2014-12-08  6:50                         ` Zhangleiqiang (Trump)
2014-12-05  1:17               ` Zhangleiqiang (Trump)
2014-12-05 12:42                 ` Wei Liu
2014-12-05 15:18                   ` Zoltan Kiss
2014-12-08  6:44                   ` Zhangleiqiang (Trump)
2014-12-08 10:13                     ` Wei Liu
2014-12-08 13:08                       ` Zhangleiqiang (Trump)
2014-12-08 13:55                         ` Wei Liu
2014-12-09  2:51                           ` Zhangleiqiang (Trump)
2014-12-09 10:05                             ` Ian Campbell
2014-12-09  9:03                           ` Zhangleiqiang (Trump)
     [not found] <3A6795EA1206904E94BEC8EF9DF109AE239B35A9@SZXEMA512-MBX.china.huawei.com>
2015-02-27  9:21 ` openlui
2015-02-27 10:59   ` Wei Liu
2015-02-27 11:30     ` David Vrabel
2015-02-28  3:21       ` openlui
2015-02-28  2:45     ` openlui
2015-03-03 10:40       ` Wei Liu

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=20141205182702.GA4754@laptop.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=brian.luohao@huawei.com \
    --cc=jonathan.davies@citrix.com \
    --cc=vitas.yuzhou@huawei.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xiaoding1@huawei.com \
    --cc=zhangleiqiang@gmail.com \
    --cc=zhangleiqiang@huawei.com \
    --cc=zhuangyuxin@huawei.com \
    --cc=zoltan.kiss@linaro.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.