[ovs-dev] [PATCH] ovn-controller: Optimize processing for non-local datapath without patch ports.

Han Zhou zhouhan at gmail.com
Wed Mar 30 22:19:08 UTC 2016


On Wed, Mar 30, 2016 at 2:01 PM, Ben Pfaff <blp at ovn.org> wrote:
>
> On Tue, Mar 29, 2016 at 12:26:18PM -0700, Han Zhou wrote:
> > For non-local datapaths, if there are no patch ports attached, it
> > means the lflows and port bindings would never be needed on the
> > Chassis. Since lflow_run() and physical_run() are the bottlenecks,
> > skipping the processing for such lflows and port bindings can save
> > significant amount of CPU, at the same time largely reduce the
> > number of rules in local openflow tables. This is specifically
> > useful when most of the lswitches are created for bridged networks,
> > where logical router is not used.
> >
> > Test precondition:
> > 2k hypervisors, 20k lports, 200 lswitches (each with a localnet
> > port).
> >
> > Test case:
> > step1: add 50 hypervisors (simulated on 1 BM with 40 cores), and
> >        wait for flow updates complete on all new hypervisors.
> > step2: create a lswitch and a localnet port, create and bind 100
> >        lports evenly on these hypervisors. Repeat this 5 times.
> >
> > Before the change:
> > Step1 took around 20 minutes.
> > Step2 took 936 seconds.
> >
> > After the change:
> > Step1 took less than 1 minute: 20x faster.
> > Step2 took 464 seconds: 2x faster.
> >
> > Signed-off-by: Han Zhou <zhouhan at gmail.com>
>
> This seems very reasonable to me.
>
> Can you think of a way to test this?

Ben, since it is an optimization without any new feature, I think
regression should be good enough. Regarding regression, the current lrouter
test case should cover the case when logical patch ports exist:

AT_SETUP([ovn -- 3 HVs, 3 LS, 3 lports/LS, 1 LR])

And localnet test case should cover the case when logical patch ports
doesn't exist.

AT_SETUP([ovn -- 2 HVs, 4 lports/HV, localnet ports])

And I also tested the lrouter scenario in a openstack devstack environment
ensured that it won't break anything.

If you are talking about testing the optimization, it is the scale-testing
environment we are using. Lei is working on sharing it to public, and
possibly integrate to OVS test so that it can find performance degradation
during every regression. That will be a longer term goal but we are working
with more people in the community to make that happen.

--
Best regards,
Han



More information about the dev mailing list