netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Pravin Shelar <pshelar@ovn.org>
Cc: Matteo Croce <mcroce@redhat.com>,
	Justin Pettit <jpettit@vmware.com>,
	Greg Rose <gvrose8192@gmail.com>, Ben Pfaff <blp@ovn.org>,
	netdev <netdev@vger.kernel.org>, ovs dev <dev@openvswitch.org>,
	Jiri Benc <jbenc@redhat.com>, Aaron <aconole@redhat.com>
Subject: Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order
Date: Tue, 7 Aug 2018 15:31:11 +0200	[thread overview]
Message-ID: <20180807153111.53b0da8d@epycfail> (raw)
In-Reply-To: <CAOrHB_B4qhwMuhWFhQco+pPyPxcSpOPswMpNyEEq2n+mET-mXA@mail.gmail.com>

Hi Pravin,

On Tue, 31 Jul 2018 16:12:03 -0700
Pravin Shelar <pshelar@ovn.org> wrote:

> Rather than reducing number of thread down to 1, we could find better
> number of FDs per port.
> How about this simple solution:
> 1. Allocate (N * P) FDs as long as it is under FD limit.
> 2. If FD limit (-EMFILE) is hit reduce N value by half and repeat step 1.

I still see a few quantitative issues with this approach, other than
Ben's observation about design (which, by the way, looks entirely
reasonable to me).

We're talking about a disproportionate amount of sockets in any case.
We can have up to 2^16 vports here, with 5k vports being rather common,
and for any reasonable value of N that manages somehow to perturbate the
distribution of upcalls per thread, we are talking about something well
in excess of 100k sockets. I think this doesn't really scale.

With the current value for N (3/4 * number of threads) this can even get
close to /proc/sys/fs/file-max on some systems, and there raising the
number of allowed file descriptors for ovs-vswitchd isn't a solution
anymore.

I would instead try to address the concerns that you had about the
original patch adding fairness in the kernel, rather than trying to
make the issue appear less severe in ovs-vswitchd.

-- 
Stefano

  reply	other threads:[~2018-08-07 15:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 14:23 [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order Matteo Croce
     [not found] ` <20180704142342.21740-1-mcroce-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-07-10 18:31   ` Pravin Shelar
2018-07-16 16:54     ` Matteo Croce
2018-07-31 19:43       ` Matteo Croce
     [not found]         ` <CAGnkfhyxQSz=8OsgTsjR3NfZ2FPwv+FjPZNPEY5VHZRsEiQ68w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-31 22:06           ` Ben Pfaff
2018-08-03 16:52             ` Stefano Brivio
2018-08-03 23:01               ` Ben Pfaff
2018-08-04  0:43                 ` Stefano Brivio
2018-08-04  0:54                   ` Ben Pfaff
2018-08-10 14:11                   ` William Tu
2018-08-14 15:25                     ` Stefano Brivio
2018-07-31 23:12         ` Pravin Shelar
2018-08-07 13:31           ` Stefano Brivio [this message]
2018-08-07 13:39             ` Stefano Brivio
2018-08-15  7:19             ` Pravin Shelar
     [not found]               ` <CAOrHB_DaA-+J=jzNOdQiUYrA7RJi30HmRESjsmGs7_z1ffpVOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-16 21:07                 ` Stefano Brivio
2018-09-26  9:58               ` Stefano Brivio
2018-09-28 17:15                 ` Pravin Shelar

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=20180807153111.53b0da8d@epycfail \
    --to=sbrivio@redhat.com \
    --cc=aconole@redhat.com \
    --cc=blp@ovn.org \
    --cc=dev@openvswitch.org \
    --cc=gvrose8192@gmail.com \
    --cc=jbenc@redhat.com \
    --cc=jpettit@vmware.com \
    --cc=mcroce@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.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;
as well as URLs for NNTP newsgroup(s).