Bug 1970122 - Small optimization suggestions for ovn-controller
Summary: Small optimization suggestions for ovn-controller
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: OVN
Version: FDP 21.E
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: OVN Team
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-09 20:30 UTC by Mark Michelson
Modified: 2021-07-02 14:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-02 14:43:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
500 node ovn-controller perf data (186.74 KB, text/plain)
2021-06-09 20:30 UTC, Mark Michelson
no flags Details

Description Mark Michelson 2021-06-09 20:30:59 UTC
Created attachment 1789664 [details]
500 node ovn-controller perf data

Based on attached perf results, there are some small optimizations that can be made in ovn-controller:

* Remove smap_get() call from datapath_is_switch() in ovn-util.c in favor of caching the result in the local_datapath struct.

* Optimize prepare_ipv6_ras() in pinctrl.c to not call smap_get() as often:
  * On the local_datapath, set a bool indicating if any of its ports is configured to use periodic RAs.
  * Call datapath_is_switch() to short-circuit if we are examining a switch instead of a router.
  * If possible, change the local_datapath peers members to use a wrapper struct instead of sbrec_port_binding, and save the periodic RA setting on it to avoid smap_get().

Aside from those, the following are ideas for performance improvement, but it is worth testing to see if it's actually helpful before actually merging:

* parse_action() in actions.c can have its if-else ladder changed into an shash lookup.

* The existing stopwatch() in ovn-controller.c could be made opt-in, potentially using an ovn-appctl command.

Comment 1 Mark Michelson 2021-07-02 14:43:15 UTC
Closing as NOTABUG. I attempted the top two optimizations, and it had no noticeable positive effect in a simple load test.


Note You need to log in before you can comment on or make changes to this bug.