-
Ben Pfaff authored
ofproto_port_open_type() was surprisingly slow because it called the function ofproto_class_find__(), which itself was surprisingly slow because it actually creates a set of strings and enumerates all of the available classes. This patch improves performance by eliminating the call to ofproto_class_find__() from ofproto_port_open_type(). In turn that required changing a parameter type and updating all the callers. Possibly it would be worth making ofproto_class_find__() itself faster, but it doesn't look like any of its other callers would be used in inner loops. For more background, see also https://mail.openvswitch.org/pipermail/ovs-discuss/2018-February/046140.html This patch arises as a result of testing done by Ali Ginwala and Han Zhou. Their test showed that commit 2d4beba1 resulted in slower performance of ovs-vswitchd than was seen in previous versions of OVS. With this patch, Ali retested and reported that performance drastically improved by ~60%. The test for 10k lports, 40 LSs and 8 LRs and 1k HVs just got completed in 3 hours 39 min vs 8+ hours for branch-2.9. Cpu utilization graph of a farm comparing Ben's ofproto patch vs branch-2.9 is available @ https://raw.githubusercontent.com/noah8713/ovn-scale-test/scale_results/results/ovs_2.9_vs_ben_ofproto.png Reported-by: Mark Michelson <mmichels@redhat.com> Acked-by: Mark Michelson <mmichels@redhat.com> Tested-by: aginwala <aginwala@asu.edu> Signed-off-by: Ben Pfaff <blp@ovn.org>
c381bca5