[ovs-dev] [RFC] dpif-netlink: don't allocate per port netlink sockets

Ben Pfaff blp at ovn.org
Wed Feb 7 18:28:00 UTC 2018


On Wed, Feb 07, 2018 at 03:47:09PM +0100, Jiri Benc wrote:
> On Tue, 23 Jan 2018 09:50:00 -0800, Ben Pfaff wrote:
> > Per-port sockets help OVS to improve fairness, so that a single busy
> > port can't monopolize all slow-path resources.  We can't just throw that
> > away.  If there's a problem with too many netlink sockets, let's come up
> > with a solution, but it can't be to eliminate fairness entirely.
> 
> The main problem with this is the sockets are dedicated to particular
> ports. With high number of ports, the number of sockets raises to such
> high value that it stops helping performance anyway. There's not much
> point of having thousands opened sockets per CPU, we'll not be able to
> utilize them anyway.
> 
> Having dedicated sockets for each port is wasteful, especially if one
> port is very busy with upcalls and other ports are mostly idle. (And if
> many ports are busy with many upcalls, we're in performance troubles
> anyway.) It would make sense to share the sockets between the ports.
> 
> I'd like to understand more about the thoughts behind the fairness. Why
> should not a single busy port use all slow-path resources in case other
> ports are idle?

A single busy port should use all slow-path resources when other ports
are idle.  That is not a fairness problem.

A single busy port should not use all slow-path resources when other
ports have some traffic.  If port p0 sends 100,000 packets per second to
the slow path (much more than the slow path can actually process) and
port p1 sends 1 packet per second to the slow path, p1 should get
service, but it is likely to not get any service at all if all of its
packets are lumped in with p0.


More information about the dev mailing list