On Fri, Jun 24, 2016 at 11:20 AM, Hui Kang <ka...@us.ibm.com> wrote:

>
> > > My question is whether there is any particular reason to allocate that
> > > number
> > > of (struct ovn_port)? It seems to me there is room in this code to
> > optimize
> > > for performance. Thanks.
> > >
> > > - Hui
> > >
> > >
> > > [1]
> > >
> >
> https://github.com/openvswitch/ovs/blob/master/ovn/northd/ovn-northd.c#L2529
> >
> > > [2]
> > >
> >
> https://github.com/openvswitch/ovs/blob/master/ovn/northd/ovn-northd.c#L571
>
> > Hui, ovn-northd's current design is that it processes the entire ovn nb
> db
> > each computational cycle, so I would expect to see what you are seeing,
> > which
> > is the argument for converting ovn-northd to an incremental processing
> > model.
> >
> > Ben, Justin, Yusheng can one of you talk to an ETA for when the nlog
> > ovn-northd code base will start to land in the review queue?  That will
> > provide input on whether doing an interim patch series is worth the
> effort
> > or not...
> >
> > Incremental processing is one angle.  The other we need to have on
> > the roadmap is some type of sharding.  This is important for HA
> > purposes, as well.  We need to be able to run multiple instances of
> > ovn-northd that each only operate on a subset of the full data set.
>
> Hi, Russell
> Thanks for your comments. I agree that sharding is an important ascpect to
> improve the southdbound db scalability. In the NVP paper [5], sharding has
> been implemented within Onix controller. However, I have no idea how
> difficulty it is to import the implementation to OVN.
>
Just in terms of ovn-northd, I was trying to think of the simplest possible
approach.  A naive approach could be:

 - Given N instances of ovn-northd (on 1 to N hosts, doesn't matter)

 - Assign an ID from 1-N to each instance of ovn-northd.  Start it with
parameters telling it the ID and the total number (N).

 - For a given resource type (and its children), such as a logical switch
and its logical ports and ACLs, have ovn-northd use the UUID to decide if
it should handle it or not.

   for ls in logical_switches:
       if ls.UUID % N == ID:
           process_logical_switch(ls)
       else:
           ... some other instance of ovn-northd handles it ...

I realize there are various problems with this, including at least:

 - not ensuring fair distribution of work

 - relying on an external entity to track cluster membership and requiring
restart of all instances of ovn-northd any time an instance of ovn-northd
is added or removed to the cluster

The paper linked seems to describe some more complete approaches.  It seems
like a very well explored area and that I should do more reading on the
topic.  I'd love to hear any ideas for preferred approaches from others if
you have them.

-- 
Russell Bryant
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to