mbox series

[ovs-dev,repost,0/7] Reduce memory consumption and time for Load_Balancer benchmark

Message ID 20210812174443.3147887-1-blp@ovn.org
Headers show
Series Reduce memory consumption and time for Load_Balancer benchmark | expand

Message

Ben Pfaff Aug. 12, 2021, 5:44 p.m. UTC
Apologies for repost; I forgot to tag this as "ovn" in the first
posting.

For the benchmark at
https://mail.openvswitch.org/pipermail/ovs-dev/2021-July/385333.html,
this reduces memory consumption from 115 GB to 17 GB and elapsed time
from 19 minutes to 5 minutes.

I think there's headroom for more improvement, because Leonid has some
cleverness that I haven't been able to successfully work in yet.

This series is also available here:
https://github.com/blp/ovs-reviews/tree/ovn-memory-4

Ben Pfaff (7):
  ovn-northd-ddlog: Merge TaggedFlow and MeteredFlow into Flow.
  ovn-northd-ddlog: Use cheaper representation for stage_hint.
  ovn-northd-ddlog: Intern Stage.
  Intern all the matches and actions.
  ovn-northd-ddlog: Get rid of duplicate flows caused by stage_hint.
  ovn-northd-ddlog: Intern nb::Logical_Switch.
  ovn-northd-ddlog: Postpone expanding external_ids, stage_hint, tags.

 northd/ipam.dl       |    2 +-
 northd/lswitch.dl    |   36 +-
 northd/multicast.dl  |    2 +-
 northd/ovn-nb.dlopts |    1 +
 northd/ovn_northd.dl | 3459 +++++++++++++++++++++++-------------------
 5 files changed, 1949 insertions(+), 1551 deletions(-)

Comments

Numan Siddique Aug. 17, 2021, 3:47 p.m. UTC | #1
On Thu, Aug 12, 2021 at 1:45 PM Ben Pfaff <blp@ovn.org> wrote:
>
> Apologies for repost; I forgot to tag this as "ovn" in the first
> posting.
>
> For the benchmark at
> https://mail.openvswitch.org/pipermail/ovs-dev/2021-July/385333.html,
> this reduces memory consumption from 115 GB to 17 GB and elapsed time
> from 19 minutes to 5 minutes.
>
> I think there's headroom for more improvement, because Leonid has some
> cleverness that I haven't been able to successfully work in yet.
>
> This series is also available here:
> https://github.com/blp/ovs-reviews/tree/ovn-memory-4

Thanks for the improvements.

For the entire series:

Acked-by: Numan Siddique <numans@ovn.org>

Numan

>
> Ben Pfaff (7):
>   ovn-northd-ddlog: Merge TaggedFlow and MeteredFlow into Flow.
>   ovn-northd-ddlog: Use cheaper representation for stage_hint.
>   ovn-northd-ddlog: Intern Stage.
>   Intern all the matches and actions.
>   ovn-northd-ddlog: Get rid of duplicate flows caused by stage_hint.
>   ovn-northd-ddlog: Intern nb::Logical_Switch.
>   ovn-northd-ddlog: Postpone expanding external_ids, stage_hint, tags.
>
>  northd/ipam.dl       |    2 +-
>  northd/lswitch.dl    |   36 +-
>  northd/multicast.dl  |    2 +-
>  northd/ovn-nb.dlopts |    1 +
>  northd/ovn_northd.dl | 3459 +++++++++++++++++++++++-------------------
>  5 files changed, 1949 insertions(+), 1551 deletions(-)
>
> --
> 2.31.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ben Pfaff Aug. 17, 2021, 8:59 p.m. UTC | #2
On Tue, Aug 17, 2021 at 11:47:50AM -0400, Numan Siddique wrote:
> On Thu, Aug 12, 2021 at 1:45 PM Ben Pfaff <blp@ovn.org> wrote:
> >
> > Apologies for repost; I forgot to tag this as "ovn" in the first
> > posting.
> >
> > For the benchmark at
> > https://mail.openvswitch.org/pipermail/ovs-dev/2021-July/385333.html,
> > this reduces memory consumption from 115 GB to 17 GB and elapsed time
> > from 19 minutes to 5 minutes.
> >
> > I think there's headroom for more improvement, because Leonid has some
> > cleverness that I haven't been able to successfully work in yet.
> >
> > This series is also available here:
> > https://github.com/blp/ovs-reviews/tree/ovn-memory-4
> 
> Thanks for the improvements.
> 
> For the entire series:
> 
> Acked-by: Numan Siddique <numans@ovn.org>

Thanks!  I applied this series.
Numan Siddique Aug. 19, 2021, 9:37 p.m. UTC | #3
On Tue, Aug 17, 2021 at 5:00 PM Ben Pfaff <blp@ovn.org> wrote:
>
> On Tue, Aug 17, 2021 at 11:47:50AM -0400, Numan Siddique wrote:
> > On Thu, Aug 12, 2021 at 1:45 PM Ben Pfaff <blp@ovn.org> wrote:
> > >
> > > Apologies for repost; I forgot to tag this as "ovn" in the first
> > > posting.
> > >
> > > For the benchmark at
> > > https://mail.openvswitch.org/pipermail/ovs-dev/2021-July/385333.html,
> > > this reduces memory consumption from 115 GB to 17 GB and elapsed time
> > > from 19 minutes to 5 minutes.
> > >
> > > I think there's headroom for more improvement, because Leonid has some
> > > cleverness that I haven't been able to successfully work in yet.
> > >
> > > This series is also available here:
> > > https://github.com/blp/ovs-reviews/tree/ovn-memory-4
> >
> > Thanks for the improvements.
> >
> > For the entire series:
> >
> > Acked-by: Numan Siddique <numans@ovn.org>
>
> Thanks!  I applied this series.

Hi Ben,

As we discussed in today's IRC meeting,  ovn-northd-ddlog with your
patches applied isn't scaling well in our
scale testing.  You can find the OVN dbs from our scale run here -
https://people.redhat.com/~nusiddiq/ovn_dbs_for_ddlog_testing/

In my laptop when I start ovn-northd-ddlog with these dbs,  it keeps
consuming a lot of memory until it OOMs out.   My laptop has 32GB RAM.

In our testing we found that the ovn-northd-ddlog is taking around 10
minutes to complete the loop.  You can reproduce the issue using  the
dbs in the above link.  After starting northd services, please delete
one of the load balancer in NB DB and you'd notice that northd-ddlog
takes a lot
of time to reflect this in SB DB.

In case you're not able to access the dbs or not able to reproduce the
issue, please let me know.

Thanks
Numan

> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>