All of lore.kernel.org
 help / color / mirror / Atom feed
From: annie li <annie.li@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: netfront/netback multiqueue exhausting grants
Date: Thu, 21 Jan 2016 10:11:57 -0500	[thread overview]
Message-ID: <56A0F53D.5020909@oracle.com> (raw)
In-Reply-To: <56A0E86C.4010105@citrix.com>


On 2016/1/21 9:17, David Vrabel wrote:
> On 21/01/16 12:19, Ian Campbell wrote:
>> On Thu, 2016-01-21 at 10:56 +0000, David Vrabel wrote:
>>> On 20/01/16 12:23, Ian Campbell wrote:
>>>> There have been a few reports recently[0] which relate to a failure of
>>>> netfront to allocate sufficient grant refs for all the queues:
>>>>
>>>> [    0.533589] xen_netfront: can't alloc rx grant refs
>>>> [    0.533612] net eth0: only created 31 queues
>>>>
>>>> Which can be worked around by increasing the number of grants on the
>>>> hypervisor command line or by limiting the number of queues permitted
>>>> by
>>>> either back or front using a module param (which was broken but is now
>>>> fixed on both sides, but I'm not sure it has been backported everywhere
>>>> such that it is a reliable thing to always tell users as a workaround).
>>>>
>>>> Is there any plan to do anything about the default/out of the box
>>>> experience? Either limiting the number of queues or making both ends
>>>> cope
>>>> more gracefully with failure to create some queues (or both) might be
>>>> sufficient?
>>>>
>>>> I think the crash after the above in the first link at [0] is fixed? I
>>>> think that was the purpose of ca88ea1247df "xen-netfront: update
>>>> num_queues
>>>> to real created" which was in 4.3.
>>> I think the correct solution is to increase the default maximum grant
>>> table size.
>> That could well make sense, but then there will just be another higher
>> limit, so we should perhaps do both.
>>
>> i.e. factoring in:
>>   * performance i.e. ability for N queues to saturate whatever sort of link
>>     contemporary Linux can saturate these days, plus some headroom, or
>>     whatever other ceiling seems sensible)
>>   * grant table resource consumption i.e. (sensible max number of blks * nr
>>     gnts per blk + sensible max number of vifs * nr gnts per vif + other
>>     devs needs) < per guest grant limit) to pick both the default gnttab
>>     size and the default max queuers.
> Yes.

Would it waste lots of resources in the case where guest vif has lots of 
queue but no network load? Here is an example of gntref consumed by vif,
Dom0 20vcpu, domu 20vcpu,
one vif would consumes 20*256*2=10240 gntref.
If setting the maximum grant table size to 64pages(default value of xen 
is 32pages now?), then only 3 vif is supported in guest. Even blk isn't 
taken account in, and also blk multi-page ring feature.

Thanks
Annie
>
>>> Although, unless you're using the not-yet-applied per-cpu rwlock patches
>>> multiqueue is terrible on many (multisocket) systems and the number of
>>> queue should be limited in netback to 4 or even just 2.
>> Presumably the guest can't tell, so it can't do this.
>>
>> I think when you say "terrible" you don't mean "worse than without mq" but
>> rather "not realising the expected gains from a larger nunber of queues",
>> right?.
> Malcolm did the analysis but if I remember correctly, 8 queues performed
> about the same as 1 queue and 16 were worse than 1 queue.
>
> David
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2016-01-21 15:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 12:23 netfront/netback multiqueue exhausting grants Ian Campbell
2016-01-20 14:40 ` Boris Ostrovsky
2016-01-20 14:52   ` Ian Campbell
2016-01-20 15:02     ` David Vrabel
2016-01-20 15:10       ` Boris Ostrovsky
2016-01-20 15:16         ` Ian Campbell
2016-01-21 10:12           ` Ian Campbell
2016-01-21 10:25             ` Wei Liu
2016-01-21 10:37               ` Ian Campbell
2016-01-21 10:52                 ` Wei Liu
2016-01-20 16:18 ` annie li
2016-01-21 10:56 ` David Vrabel
2016-01-21 12:19   ` Ian Campbell
2016-01-21 14:17     ` David Vrabel
2016-01-21 15:11       ` annie li [this message]
2016-01-22  3:36     ` Bob Liu
2016-01-22  7:53       ` Jan Beulich
2016-01-22 10:40         ` Bob Liu
2016-01-22 11:02           ` Jan Beulich
2016-01-23  0:29             ` Bob Liu
2016-01-25  9:53               ` Jan Beulich

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=56A0F53D.5020909@oracle.com \
    --to=annie.li@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.