[ovs-dev] Scaling the flow table

Ben Pfaff blp at nicira.com
Tue May 12 23:00:22 UTC 2015


On Tue, May 12, 2015 at 10:21:19AM +0200, Duarte Nunes wrote:
> We've observed that for high flow setup rates, the flow table becomes a
> bottleneck since it only allows a single writer (all CRUD flow operations
> take the ovs_mutex).
> 
> A solution for this is to shard the flow table. A hash function is used to
> know which table to query on packet ingress and on recirculate as well as
> to know on which table to CRUD a flow. Some bits off the flow ID are used
> to identify the shard. The number of shards is configured upon datapath
> creation.

First, I'm surprised to see high flow setup rates since the introduction
of megaflows.  Generally, megaflows greatly reduce the flow setup rate.

Second, is it possible to use a better data structure?  Perhaps one
could, for example, use a mutex per hash chain, instead of a single
mutex, or per-CPU data structures.  Ideally, if the data structures were
improved, then one would not need to change the datapath interface at
all.



More information about the dev mailing list