<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 19, 2019 at 6:19 PM Numan Siddique &lt;<a href="mailto:nusiddiq@redhat.com">nusiddiq@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 19, 2019 at 6:28 AM Han Zhou &lt;<a href="mailto:zhouhan@gmail.com" target="_blank">zhouhan@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br>On Tue, Jul 9, 2019 at 12:13 AM Numan Siddique &lt;<a href="mailto:nusiddiq@redhat.com" target="_blank">nusiddiq@redhat.com</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Tue, Jul 9, 2019 at 12:25 PM Daniel Alvarez Sanchez &lt;<a href="mailto:dalvarez@redhat.com" target="_blank">dalvarez@redhat.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; Thanks Numan for running these tests outside OpenStack!<br>&gt;&gt;<br>&gt;&gt; On Tue, Jul 9, 2019 at 7:50 AM Numan Siddique &lt;<a href="mailto:nusiddiq@redhat.com" target="_blank">nusiddiq@redhat.com</a>&gt; wrote:<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; On Tue, Jul 9, 2019 at 11:05 AM Han Zhou &lt;<a href="mailto:zhouhan@gmail.com" target="_blank">zhouhan@gmail.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; On Fri, Jun 21, 2019 at 12:31 AM Han Zhou &lt;<a href="mailto:zhouhan@gmail.com" target="_blank">zhouhan@gmail.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; On Thu, Jun 20, 2019 at 11:42 PM Numan Siddique &lt;<a href="mailto:nusiddiq@redhat.com" target="_blank">nusiddiq@redhat.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; On Fri, Jun 21, 2019, 11:47 AM Han Zhou &lt;<a href="mailto:zhouhan@gmail.com" target="_blank">zhouhan@gmail.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; On Tue, Jun 11, 2019 at 9:16 AM Daniel Alvarez Sanchez &lt;<a href="mailto:dalvarez@redhat.com" target="_blank">dalvarez@redhat.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; Thanks a lot Han for the answer!<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; On Tue, Jun 11, 2019 at 5:57 PM Han Zhou &lt;<a href="mailto:zhouhan@gmail.com" target="_blank">zhouhan@gmail.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; On Tue, Jun 11, 2019 at 5:12 AM Dumitru Ceara &lt;<a href="mailto:dceara@redhat.com" target="_blank">dceara@redhat.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; On Tue, Jun 11, 2019 at 10:40 AM Daniel Alvarez Sanchez<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &lt;<a href="mailto:dalvarez@redhat.com" target="_blank">dalvarez@redhat.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; Hi Han, all,<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; Lucas, Numan and I have been doing some &#39;scale&#39; testing of OpenStack<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; using OVN and wanted to present some results and issues that we&#39;ve<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; found with the Incremental Processing feature in ovn-controller. Below<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; is the scenario that we executed:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; * 7 baremetal nodes setup: 3 controllers (running<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; ovn-northd/ovsdb-servers in A/P with pacemaker) + 4 compute nodes. OVS<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; 2.10.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; * The test consists on:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;   - Create openstack network (OVN LS), subnet and router<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;   - Attach subnet to the router and set gw to the external network<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;   - Create an OpenStack port and apply a Security Group (ACLs to allow<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; UDP, SSH and ICMP).<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;   - Bind the port to one of the 4 compute nodes (randomly) by<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; attaching it to a network namespace.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;   - Wait for the port to be ACTIVE in Neutron (&#39;up == True&#39; in NB)<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;   - Wait until the test can ping the port<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; * Running browbeat/rally with 16 simultaneous process to execute the<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; test above 150 times.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; * When all the 150 &#39;fake VMs&#39; are created, browbeat will delete all<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; the OpenStack/OVN resources.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; We first tried with OVS/OVN 2.10 and pulled some results which showed<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; 100% success but ovn-controller is quite loaded (as expected) in all<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; the nodes especially during the deletion phase:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; - Compute node: <a href="https://imgur.com/a/tzxfrIR" target="_blank">https://imgur.com/a/tzxfrIR</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; - Controller node (ovn-northd and ovsdb-servers): <a href="https://imgur.com/a/8ffKKYF" target="_blank">https://imgur.com/a/8ffKKYF</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; After conducting the tests above, we replaced ovn-controller in all 7<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; nodes by the one with the current master branch (actually from last<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; week). We also replaced ovn-northd and ovsdb-servers but the<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; ovs-vswitchd has been left untouched (still on 2.10). The expected<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; results were to get less ovn-controller CPU usage and also better<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; times due to the Incremental Processing feature introduced recently.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; However, the results don&#39;t look very good:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; - Compute node: <a href="https://imgur.com/a/wuq87F1" target="_blank">https://imgur.com/a/wuq87F1</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; - Controller node (ovn-northd and ovsdb-servers): <a href="https://imgur.com/a/99kiyDp" target="_blank">https://imgur.com/a/99kiyDp</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; One thing that we can tell from the ovs-vswitchd CPU consumption is<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; that it&#39;s much less in the Incremental Processing (IP) case which<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; apparently doesn&#39;t make much sense. This led us to think that perhaps<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; ovn-controller was not installing the necessary flows in the switch<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; and we confirmed this hypothesis by looking into the dataplane<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; results. Out of the 150 VMs, 10% of them were unreachable via ping<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; when using ovn-controller from master.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; @Han, others, do you have any ideas as of what could be happening<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; here? We&#39;ll be able to use this setup for a few more days so let me<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; know if you want us to pull some other data/traces, ...<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; Some other interesting things:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; On each of the compute nodes, (with an almost evenly distributed<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; number of logical ports bound to them), the max amount of logical<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; flows in br-int is ~90K (by the end of the test, right before deleting<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; the resources).<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; It looks like with the IP version, ovn-controller leaks some memory:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; <a href="https://imgur.com/a/trQrhWd" target="_blank">https://imgur.com/a/trQrhWd</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; While with OVS 2.10, it remains pretty flat during the test:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; <a href="https://imgur.com/a/KCkIT4O" target="_blank">https://imgur.com/a/KCkIT4O</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; Hi Daniel, Han,<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; I just sent a small patch for the ovn-controller memory leak:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; <a href="https://patchwork.ozlabs.org/patch/1113758/" target="_blank">https://patchwork.ozlabs.org/patch/1113758/</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; At least on my setup this is what valgrind was pointing at.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; Cheers,<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; Dumitru<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; Looking forward to hearing back :)<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; Daniel<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; PS. Sorry for my previous email, I sent it by mistake without the subject<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; _______________________________________________<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; discuss mailing list<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; <a href="mailto:discuss@openvswitch.org" target="_blank">discuss@openvswitch.org</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; &gt; &gt; <a href="https://mail.openvswitch.org/mailman/listinfo/ovs-discuss" target="_blank">https://mail.openvswitch.org/mailman/listinfo/ovs-discuss</a><br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; Thanks Daniel for the testing and reporting, and thanks Dumitru for fixing the memory leak.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; Currently ovn-controller incremental processing only handles below SB changes incrementally:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; - logical_flow<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; - port_binding (for regular VIF binding NOT on current chassis)<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; - mc_group<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; - address_set<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; - port_group<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; - mac_binding<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; So, in test scenario you described, since each iteration creates network (SB datapath changes) and router ports (port_binding changes for non VIF), the incremental processing would not help much, because most steps in your test should trigger recompute. It would help if you create more Fake VMs in each iteration, e.g. create 10 VMs or more on each LS. Secondly, when VIF port-binding happens on current chassis, the ovn-controller will still do re-compute, and because you have only 4 compute nodes, so 1/4 of the compute node will still recompute even when binding a regular VIF port. When you have more compute nodes you would see incremental processing more effective.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; Got it, it makes sense (although then worst case, it should be at<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; least what we had before and not worse but it can also be because<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; we&#39;re mixing version here: 2.10 vs master).<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; However, what really worries me is the 10% VM unreachable. I have one confusion here on the test steps. The last step you described was: - Wait until the test can ping the port. So if the VM is not pingable the test won&#39;t continue?<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; Sorry I should&#39;ve explained it better. We wait for 2 minutes to the<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; port to respond to pings, if it&#39;s not reachable then we continue with<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; the next port (16 rally processes are running simultaneously so the<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; rest of the process may be doing stuff at the same time).<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; To debug the problem, the first thing is to identify what flows are missing for the VMs that is unreachable. Could you do ovs-appctl ofproto/trace for the ICMP flow of any VM with ping failure? And then, please enable debug log for ovn-controller with ovs-appctl -t ovn-controller vlog/set file:dbg. There may be too many logs so please enable it for as short time as any VM with ping failure is reproduced. If the last step &quot;wait until the test can ping the port&quot; is there then it should be able to detect the first occurrence if the VM is not reachable in e.g. 30 sec.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; We&#39;ll need to hack a bit here but let&#39;s see :)<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; In the ovn-scale-test we didn&#39;t have data plane test, but this problem was not seen in our live environment either, with a far larger scale. The major difference in your test v.s. our environment are:<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; - We are runing with an older version. So there might be some rebase/refactor problem caused this. To eliminate this, I&#39;d suggest to try a branch I created for 2.10 (<a href="https://github.com/hzhou8/ovs/tree/ip12_rebase_on_2.10" target="_blank">https://github.com/hzhou8/ovs/tree/ip12_rebase_on_2.10</a>), which matches the base test you did which is also 2.10. It may also eliminate compatibility problem, if there is any, between OVN master branch and OVS 2.10 as you mentioned is used in the test.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; - We don&#39;t use Security Group (I guess the  ~90k OVS flows you mentioned were mainly introduced by the Security Group use, if all ports were put in same group). The incremental processing is expected to be correct for security-groups, and handling it incrementally because of address_set and port_group incremental processing. However, since the testing only relied on the regression tests, I am not 100% sure if the test coverage was sufficient. So could you try disabling Security Group to rule out the problem?<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; Ok will try to repeat the tests without the SGs.<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; Thanks,<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; &gt; Han<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; Thanks once again!<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; &gt; Daniel<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; Hi Daniel,<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; Any updates? Do you still see the 10% VM unreachable<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; Thanks,<br>&gt;&gt; &gt;&gt; &gt; &gt;&gt; Han<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; Hi Han,<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; As such there is no datapath impact. After increasing the ping wait timeout value from 120 seconds to 180 seconds its 100% now.<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; But the time taken to program the flows is too huge when compared to OVN master without IP patches.<br>&gt;&gt; &gt;&gt; &gt; &gt; Here is some data -  <a href="http://paste.openstack.org/show/753224/" target="_blank">http://paste.openstack.org/show/753224/</a> .  I am still investigating it. I will update my findings in some time.<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; Please see the times for the action - vm.wait_for_ping<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; Thanks Numan for the investigation and update. Glad to hear there is no correctness issue, but sorry for the slowness in your test scenario. I expect that the operations in your test trigger recomputing and the worst case should be similar performance as withour I-P. It is weird that it turned out so much slower in your test. There can be some extra overhead when it tries to do incremental processing and then fallback to full recompute, but it shouldn&#39;t cause that big difference. It might be that for some reason the main loop iteration is triggered more times unnecessarily. I&#39;d suggest to compare the coverage counter &quot;lflow_run&quot; between the tests, and also check perf report to see if the hotspot is somewhere else. (Sorry that I can&#39;t provide full-time help now since I am still on vacation but I will try to be useful if things are blocked)<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Hi Numan/Daniel, do you have any new findings on why I-P got worse result in your test? The extremely long latency (2 - 3 min) shown in your report reminds me a similar problem I reported before: <a href="https://mail.openvswitch.org/pipermail/ovs-dev/2018-April/346321.html" target="_blank">https://mail.openvswitch.org/pipermail/ovs-dev/2018-April/346321.html</a><br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; The root cause of that problem was still not clear. In that report, the extremely long latency (7 min) was observed without I-P and it didn&#39;t happen with I-P. If it is the same problem, then I suspect it is not related to I-P or non I-P, but some problem related to ovsdb monitor condition change. To confirm if it is same problem, could you:<br>&gt;&gt; &gt;&gt; 1. pause the test when the scale is big enough (e.g. when the test is almost completed), and then<br>&gt;&gt; &gt;&gt; 2. enable ovn-controller debug log, and then<br>&gt;&gt; &gt;&gt; 3. run one more iteration of the test, and see if the time was spent on waiting for SB DB update notification.<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Please ignore my speculation above if you already found the root cause and it would be great if you could share it :)<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Thanks for sharing this Han.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; I do not have any new findings. Yesterday I ran ovn-scale-test comparing OVN with IP vs without IP (using the master branch).<br>&gt;&gt; &gt; The test creates a new logical switch, adds it to a router, few ACLs and creates 2 logical ports and pings between them.<br>&gt;&gt; &gt; I am using physical deployment which creates actual namespaces instead of sandboxes.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; The results doesn&#39;t show any huge difference between the two.<br>&gt;&gt; 2300 vs 2900 seconds total time or  44 vs 56 seconds for the 95%ile?<br>&gt;&gt; It is not negligible IMHO. It&#39;s a &gt;25% penalty with the IP. Maybe I<br>&gt;&gt; missed something from the results?<br>&gt;&gt;<br>&gt;<br>&gt; Initially I ran with ovn-nbctl running commands as one batch (ie combining commands with &quot;--&quot;). The results were very similar. Like this one <br>&gt;<br>&gt; *******<br>&gt;<br>&gt; With non IP - ovn-nbctl NO daemon mode<br>&gt;<br>&gt; +--------------------------------------------------------------------------------------------------------------+<br>&gt; |                                             Response Times (sec)                                             |<br>&gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt; | action                                | min   | median | 90%ile | 95%ile | max    | avg    | success | count |<br>&gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt; | ovn_network.create_routers            | 0.288 | 0.429  | 5.454  | 5.538  | 20.531 | 1.523  | 100.0%  | 1000  |<br>&gt; | ovn.create_lswitch                    | 0.046 | 0.139  | 0.202  | 5.084  | 10.259 | 0.441  | 100.0%  | 1000  |<br>&gt; | ovn_network.connect_network_to_router | 0.164 | 0.411  | 5.307  | 5.491  | 15.636 | 1.128  | 100.0%  | 1000  |<br>&gt; | ovn.create_lport                      | 0.11  | 0.272  | 0.478  | 5.284  | 15.496 | 0.835  | 100.0%  | 1000  |<br>&gt; | ovn_network.bind_port                 | 1.302 | 2.367  | 2.834  | 3.24   | 12.409 | 2.527  | 100.0%  | 1000  |<br>&gt; | ovn_network.wait_port_up              | 0.0   | 0.001  | 0.001  | 0.001  | 0.002  | 0.001  | 100.0%  | 1000  |<br>&gt; | ovn_network.ping_ports                | 0.04  | 10.24  | 10.397 | 10.449 | 10.82  | 6.767  | 100.0%  | 1000  |<br>&gt; | total                                 | 2.219 | 13.903 | 23.068 | 24.538 | 49.437 | 13.222 | 100.0%  | 1000  |<br>&gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt;<br>&gt;<br>&gt; With IP - ovn-nbctl NO daemon mode<br>&gt;<br>&gt; concurrency - 10<br>&gt;<br>&gt; +--------------------------------------------------------------------------------------------------------------+<br>&gt; |                                             Response Times (sec)                                             |<br>&gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt; | action                                | min   | median | 90%ile | 95%ile | max    | avg    | success | count |<br>&gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt; | ovn_network.create_routers            | 0.274 | 0.402  | 0.493  | 0.51   | 0.584  | 0.408  | 100.0%  | 1000  |<br>&gt; | ovn.create_lswitch                    | 0.064 | 0.137  | 0.213  | 0.244  | 0.33   | 0.146  | 100.0%  | 1000  |<br>&gt; | ovn_network.connect_network_to_router | 0.203 | 0.395  | 0.677  | 0.766  | 0.912  | 0.427  | 100.0%  | 1000  |<br>&gt; | ovn.create_lport                      | 0.13  | 0.261  | 0.437  | 0.497  | 0.604  | 0.283  | 100.0%  | 1000  |<br>&gt; | ovn_network.bind_port                 | 1.307 | 2.374  | 2.816  | 2.904  | 3.401  | 2.325  | 100.0%  | 1000  |<br>&gt; | ovn_network.wait_port_up              | 0.0   | 0.001  | 0.001  | 0.001  | 0.002  | 0.001  | 100.0%  | 1000  |<br>&gt; | ovn_network.ping_ports                | 0.028 | 10.237 | 10.422 | 10.474 | 11.281 | 6.453  | 100.0%  | 1000  |<br>&gt; | total                                 | 2.251 | 13.631 | 14.822 | 15.008 | 15.901 | 10.044 | 100.0%  | 1000  |<br>&gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt;<br>&gt; *****************<br>&gt;<br>&gt; The results I shared in the previous email were with  ACLs added and ovn-nbctl - batch mode disabled.<br>&gt;<br>&gt; I agree with you. Let me do few more runs to be sure that the results are consistent.<br>&gt;<br>&gt; Thanks<br>&gt; Numan<br>&gt;<br>&gt;<br>&gt;&gt; &gt; I will test with OVN 2.9 vs 2.11 master along with what you have suggested above and see if there are any problems related to ovsdb monitor condition change.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Thanks<br>&gt;&gt; &gt; Numan<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Below are the results<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; With IP master - nbctl daemon node - No batch mode<br>&gt;&gt; &gt; concurrency - 10<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; +--------------------------------------------------------------------------------------------------------------+<br>&gt;&gt; &gt; |                                             Response Times (sec)                                             |<br>&gt;&gt; &gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt;&gt; &gt; | action                                | min   | median | 90%ile | 95%ile | max    | avg    | success | count |<br>&gt;&gt; &gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt;&gt; &gt; | ovn_network.create_routers            | 0.269 | 0.661  | 10.426 | 15.422 | 37.259 | 3.721  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn.create_lswitch                    | 0.313 | 0.45   | 12.107 | 15.373 | 30.405 | 4.185  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn_network.connect_network_to_router | 0.163 | 0.255  | 10.121 | 10.64  | 20.475 | 2.655  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn.create_lport                      | 0.351 | 0.514  | 12.255 | 15.511 | 34.74  | 4.621  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn_network.bind_port                 | 1.362 | 2.447  | 7.34   | 7.651  | 17.651 | 3.146  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn_network.wait_port_up              | 0.086 | 2.734  | 5.272  | 7.827  | 22.717 | 2.957  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn_network.ping_ports                | 0.038 | 10.196 | 20.285 | 20.39  | 40.74  | 7.52   | 100.0%  | 1000  |<br>&gt;&gt; &gt; | total                                 | 2.862 | 27.267 | 49.956 | 56.39  | 90.884 | 28.808 | 100.0%  | 1000  |<br>&gt;&gt; &gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt;&gt; &gt; Load duration: 2950.4133141<br>&gt;&gt; &gt; Full duration: 2951.58845997 seconds<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; ***********<br>&gt;&gt; &gt; With non IP - nbctl daemin node -ACLs - No batch mode<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; concurrency - 10<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; +--------------------------------------------------------------------------------------------------------------+<br>&gt;&gt; &gt; |                                             Response Times (sec)                                             |<br>&gt;&gt; &gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt;&gt; &gt; | action                                | min   | median | 90%ile | 95%ile | max    | avg    | success | count |<br>&gt;&gt; &gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt;&gt; &gt; | ovn_network.create_routers            | 0.267 | 0.421  | 10.395 | 10.735 | 25.501 | 3.09   | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn.create_lswitch                    | 0.314 | 0.408  | 10.331 | 10.483 | 25.357 | 3.049  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn_network.connect_network_to_router | 0.153 | 0.249  | 6.552  | 10.268 | 20.545 | 2.236  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn.create_lport                      | 0.344 | 0.49   | 10.566 | 15.428 | 25.542 | 3.906  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn_network.bind_port                 | 1.372 | 2.409  | 7.437  | 7.665  | 17.518 | 3.192  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn_network.wait_port_up              | 0.086 | 1.323  | 5.157  | 7.769  | 20.166 | 2.291  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | ovn_network.ping_ports                | 0.034 | 2.077  | 10.347 | 10.427 | 20.307 | 5.123  | 100.0%  | 1000  |<br>&gt;&gt; &gt; | total                                 | 3.109 | 21.26  | 39.245 | 44.495 | 70.197 | 22.889 | 100.0%  | 1000  |<br>&gt;&gt; &gt; +---------------------------------------+-------+--------+--------+--------+--------+--------+---------+-------+<br>&gt;&gt; &gt; Load duration: 2328.11378407<br>&gt;&gt; &gt; Full duration: 2334.43504095 seconds<br>&gt;&gt; &gt;<br>&gt;&gt;<br><br>Hi Numan/Daniel,<br><br><div>I spent some time investigating this problem you reported. Thanks Numan for the offline help sharing the details.</div><div><br></div><div>Although I still didn&#39;t reproduce the slowness in my current single node testing env with almost same steps and ACLs shared by Numan, I think I may have figured out a highy probable cause of what you have seen.</div><br>Here is my theory: there is a difference between the I-P and non-I-P in the main loop. The non-I-P version checks ofctrl_can_put() before doing any flow computation (which is introduced to solve a serious performance problem when there are many OVS flows on a single node, see [1]). When worked out the I-P version, I found this may not be the best approach, since there can be new incremental changes coming and we want to process them in current iteration incrementally, so that we don&#39;t need to fallback to recompute in next iteration. So this logic is changed so that we always prioritize computing new changes and keeping the desired flow table up to date, while the in-flight messages to ovs-vswitchd may still pending for an older version of desired state. In the end the final desired state will be synced again to ovs-vswitchd. If there are new changes that triggers recompute again, the recompute (which is always slow) will slow down the ofctrl_run() which keeps sending old pending messages to ovs-vswitchd by the same main thread. (But it won&#39;t cause the original performance problem any more because incremental processing engine will not recompute when there is no input change).<br><br>However, when the test scenario triggers recompute frequently, each single change may take longer to be enforced in OVS, because of this new approach. The later recompute iterations would slow down the previous computed OVS flow installation. In your test you used parallel 10, which means at any point there might be new changes from one client such as creating new router that triggers recomputing, which can block the OVS flow installation triggered earlier for another client. So overall you will see much bigger latency for each individual test iteration.<br><br><div>This can also explain why I didn&#39;t reproduce the problem in my single-client single-node environment, since each iteration is serialized.</div><div><br></div><div>[1] <a href="https://github.com/openvswitch/ovs/commit/74c760c8fe99d554b94423d49d13d5ca3dea0d9e" target="_blank">https://github.com/openvswitch/ovs/commit/74c760c8fe99d554b94423d49d13d5ca3dea0d9e</a></div><br>To prove this theory, could you help with two tests reusing your environment? Thanks a lot!<br><br></div></blockquote><div><br></div><div>Thanks Han. I will try these and come back to you with the results.</div><div><br></div><div>Numan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">1. Instead of parallelism of 10, try 1, to make sure the test is serialized. I&#39;d expect the result should be similar w/ v.s. w/o I-P.<br><br><div>2. Try below patch on the I-P version you are testing, to see if the problem is gone.<br></div><div>----8&gt;&lt;--------------------------------------------&gt;&lt;8---------------</div><div>diff --git a/ovn/controller/ofctrl.c b/ovn/controller/ofctrl.c<br>index 043abd6..0fcaa72 100644<br>--- a/ovn/controller/ofctrl.c<br>+++ b/ovn/controller/ofctrl.c<br>@@ -985,7 +985,7 @@ add_meter(struct ovn_extend_table_info *m_desired,<br>  * in the correct state and not backlogged with existing flow_mods.  (Our<br>  * criteria for being backlogged appear very conservative, but the socket<br>  * between ovn-controller and OVS provides some buffering.) */<br>-static bool<br>+bool<br> ofctrl_can_put(void)<br> {<br>     if (state != S_UPDATE_FLOWS<br>diff --git a/ovn/controller/ofctrl.h b/ovn/controller/ofctrl.h<br>index ed8918a..2b21c11 100644<br>--- a/ovn/controller/ofctrl.h<br>+++ b/ovn/controller/ofctrl.h<br>@@ -51,6 +51,7 @@ void ofctrl_put(struct ovn_desired_flow_table *,<br>                 const struct sbrec_meter_table *,<br>                 int64_t nb_cfg,<br>                 bool flow_changed);<br>+bool ofctrl_can_put(void);<br> void ofctrl_wait(void);<br> void ofctrl_destroy(void);<br> int64_t ofctrl_get_cur_cfg(void);<br>diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c<br>index c4883aa..c85c6fa 100644<br>--- a/ovn/controller/ovn-controller.c<br>+++ b/ovn/controller/ovn-controller.c<br>@@ -1954,7 +1954,7 @@ main(int argc, char *argv[])<br> <br>                     stopwatch_start(CONTROLLER_LOOP_STOPWATCH_NAME,<br>                                     time_msec());<br>-                    if (ovnsb_idl_txn) {<br>+                    if (ovnsb_idl_txn &amp;&amp; ofctrl_can_put()) {<br>                         engine_run(&amp;en_flow_output, ++engine_run_id);<br>                     }<br>                     stopwatch_stop(CONTROLLER_LOOP_STOPWATCH_NAME,<br></div></div></blockquote></div></div></blockquote><div><br></div><div><br></div><div>Hi Han,</div><div><br></div><div>So far I could do just one run after applying your above suggested patch with the I-P version and  results look promising.</div><div>It seems to me the problem is gone.</div><div><br></div><div>+--------------------------------------------------------------------------------------------------------------------------+<br>|                                             Response Times (sec)                                                                    |<br>+----------------------------------+--------+----------+----------+----------+---------+---------+------------+-------+<br>| action                                | min   | median | 90%ile | 95%ile | max    | avg    | success | count   |<br>+----------------------------------+--------+----------+----------+----------+---------+---------+------------+-------+<br>| ovn_network.ping_ports   | 0.037 | 10.236 | 10.392 | 10.462 | 20.455 | 7.15   | 100.0%  | 1000  |<br>+----------------------------------+--------+----------+----------+----------+---------+---------+------------+-------+<br>| ovn_network.ping_ports   | 0.036 | 10.255 | 10.448 | 11.323 | 20.791 | 7.83   | 100.0%  | 1000  |<br>+----------------------------------+--------+----------+----------+----------+---------+---------+------------+-------+<br></div><div><br></div><div>The first row represents Non IP and the 2nd row represents IP + your suggested patch.</div><div>The values are comparable and lot better compared to without your patch.</div><div><br></div><div>On monday I will do more runs to be sure that the data is consistent and get back to you.</div><div><br></div><div>If the results are consistent, I would try to run the tests which Daniel and Lucas ran on an openstack deployment.</div><div><br></div><div>Thanks</div><div>Numan</div><div><br></div><div><br></div></div></div>