mbox series

[ovs-dev,ovn,0/6] Incremental processing improvements.

Message ID 20200316111034.1686721-1-numans@ovn.org
Headers show
Series Incremental processing improvements. | expand

Message

Numan Siddique March 16, 2020, 11:10 a.m. UTC
From: Numan Siddique <numans@ovn.org>

(Removed the RFC tag and Submitting these patches as formal patches now)

This patch series tries to handle port binding, datapath binding
and ovs interface changes incrementally.

Below are the results of some testing I did with ovn-fake-multinode
setup

Test setup
------
 1. ovn-central fake node running OVN dbs and 2 compute nodes running
    ovn-controller.

 2. Before running the tests, used an existing OVN db with the below
resources
   No of logical switches     - 53
   No of logical ports        - 1256
   No of logical routers      - 9
   No of logical router ports - 56
   No of port groups          - 152
   No of logical flows        - 45447

   Port bindings on compute-1 -  19
   Port bindings on compute-2 -  18
   No of OF flows on compute-1 - 84996
   No of OF flows on compute-2 - 84901

 3. The test does the following
    - Creates 2 logical switches (one for each compute node) and connect to a
      logical router for each compute node.
    - 100 logical ports are created (50 per lswitch), a simple ACL is added and the address
      set is created for each port.
    - Each port is bound on the respective compute node and the test
      pings the IP of the port (from another port belonging to the same
      lswitch created earlier).


Below are the results with OVN master

+----------------------------------------------------------------------------------------------------------+
|                                           Response Times (sec)                                           |
+----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+
| action                           | min    | median | 90%ile | 95%ile | max    | avg    | success | count |
+----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+
| ovn.create_or_update_address_set | 0.484  | 0.507  | 0.526  | 0.537  | 0.547  | 0.51   | 100.0%  | 100   |
| ovn.create_port_acls             | 0.948  | 1.014  | 1.05   | 1.06   | 1.089  | 1.016  | 100.0%  | 100   |
| ovn_network.bind_port            | 1.244  | 1.294  | 1.333  | 1.346  | 1.397  | 1.301  | 100.0%  | 100   |
| ovn.bind_ovs_vm                  | 0.379  | 0.432  | 0.463  | 0.469  | 0.472  | 0.434  | 100.0%  | 100   |
| ovn.bind_internal_vm             | 0.824  | 0.861  | 0.897  | 0.906  | 0.941  | 0.868  | 100.0%  | 100   |
| ovn_network.wait_port_ping       | 7.153  | 7.183  | 7.214  | 7.22   | 7.237  | 7.185  | 100.0%  | 100   |
| total                            | 10.373 | 10.479 | 10.544 | 10.551 | 10.581 | 10.483 | 100.0%  | 100   |
+----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+
Load duration: 1048.8911039829254
Full duration: 1050.4055325984955

Below are the results with these patches

+-------------------------------------------------------------------------------------------------------+
|                                         Response Times (sec)                                          |
+----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+
| action                           | min   | median | 90%ile | 95%ile | max   | avg   | success | count |
+----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+
| ovn.create_or_update_address_set | 0.479 | 0.492  | 0.513  | 0.52   | 0.531 | 0.495 | 100.0%  | 100   |
| ovn.create_port_acls             | 0.946 | 0.964  | 0.998  | 1.001  | 1.041 | 0.969 | 100.0%  | 100   |
| ovn_network.bind_port            | 1.22  | 1.297  | 1.342  | 1.36   | 1.402 | 1.298 | 100.0%  | 100   |
| ovn.bind_ovs_vm                  | 0.373 | 0.418  | 0.436  | 0.455  | 0.472 | 0.42  | 100.0%  | 100   |
| ovn.bind_internal_vm             | 0.818 | 0.88   | 0.911  | 0.93   | 0.982 | 0.878 | 100.0%  | 100   |
| ovn_network.wait_port_ping       | 3.812 | 3.854  | 3.906  | 3.934  | 4.015 | 3.861 | 100.0%  | 100   |
| total                            | 6.977 | 7.165  | 7.277  | 7.308  | 7.401 | 7.176 | 100.0%  | 100   |
+----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+
Load duration: 718.401807308197
Full duration: 719.8932237625122


Testing the same with fresh OVN dbs didn't show any improvements in the
timings.


RFC v2 -> v1
---------
 * Fixed the 2 failing test cases.
 * Updated the commit messages.


RFC v1 -> RFC v2
---------
 * Added 2 new patches
 * Patch 5 (ofctrl_check_and_add_flow) was submitted earlier too and
   the previous discussion is here - https://patchwork.ozlabs.org/patch/1202417/
 * Patch 6 handles I-P for ct_zone and OVS interface changes in
   flow_output_run stage.
Numan Siddique (6):
  Refactor binding_run()to take two context argument - binding_ctx_in
    and binding_ctx_out.
  ovn-controller: Refactor binding.c
  ovn-controller: I-P for port binding in runtime_data stage
  ovn-controller: I-P for datapath binding
  ofctrl_check_and_add_flow: Replace the actions of an existing flow if
    actions have changed.
  ovn-controller: I-P for ct zone  and OV


Numan Siddique (6):
  Refactor binding_run()to take two context argument - binding_ctx_in
    and binding_ctx_out.
  ovn-controller: Store the local port bindings in the runtime data I-P
    state.
  ovn-controller: I-P for SB port binding and OVS interface in
    runtime_data.
  ovn-controller: I-P for datapath binding
  ofctrl_check_and_add_flow: Replace the actions of an existing flow if
    actions have changed.
  ovn-controller: I-P for ct zone and OVS interface changes in flow
    output stage.

 controller/binding.c        | 1112 ++++++++++++++++++++++++-----------
 controller/binding.h        |   58 +-
 controller/lflow.c          |   13 +
 controller/lflow.h          |    2 +
 controller/ofctrl.c         |   23 +-
 controller/ovn-controller.c |  332 ++++++++---
 controller/ovn-controller.h |   22 +
 controller/physical.c       |   48 ++
 controller/physical.h       |    5 +-
 controller/pinctrl.c        |   19 +-
 controller/pinctrl.h        |    4 +-
 tests/ovn-performance.at    |   22 +-
 12 files changed, 1197 insertions(+), 463 deletions(-)

Comments

Han Zhou March 25, 2020, 6:50 a.m. UTC | #1
On Mon, Mar 16, 2020 at 4:11 AM <numans@ovn.org> wrote:
>
> From: Numan Siddique <numans@ovn.org>
>
> (Removed the RFC tag and Submitting these patches as formal patches now)
>
> This patch series tries to handle port binding, datapath binding
> and ovs interface changes incrementally.
>
> Below are the results of some testing I did with ovn-fake-multinode
> setup
>
> Test setup
> ------
>  1. ovn-central fake node running OVN dbs and 2 compute nodes running
>     ovn-controller.
>
>  2. Before running the tests, used an existing OVN db with the below
> resources
>    No of logical switches     - 53
>    No of logical ports        - 1256
>    No of logical routers      - 9
>    No of logical router ports - 56
>    No of port groups          - 152
>    No of logical flows        - 45447
>
>    Port bindings on compute-1 -  19
>    Port bindings on compute-2 -  18
>    No of OF flows on compute-1 - 84996
>    No of OF flows on compute-2 - 84901
>
>  3. The test does the following
>     - Creates 2 logical switches (one for each compute node) and connect
to a
>       logical router for each compute node.
>     - 100 logical ports are created (50 per lswitch), a simple ACL is
added and the address
>       set is created for each port.
>     - Each port is bound on the respective compute node and the test
>       pings the IP of the port (from another port belonging to the same
>       lswitch created earlier).
>
>
> Below are the results with OVN master
>
>
+----------------------------------------------------------------------------------------------------------+
> |                                           Response Times (sec)
                                  |
>
+----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+
> | action                           | min    | median | 90%ile | 95%ile |
max    | avg    | success | count |
>
+----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+
> | ovn.create_or_update_address_set | 0.484  | 0.507  | 0.526  | 0.537  |
0.547  | 0.51   | 100.0%  | 100   |
> | ovn.create_port_acls             | 0.948  | 1.014  | 1.05   | 1.06   |
1.089  | 1.016  | 100.0%  | 100   |
> | ovn_network.bind_port            | 1.244  | 1.294  | 1.333  | 1.346  |
1.397  | 1.301  | 100.0%  | 100   |
> | ovn.bind_ovs_vm                  | 0.379  | 0.432  | 0.463  | 0.469  |
0.472  | 0.434  | 100.0%  | 100   |
> | ovn.bind_internal_vm             | 0.824  | 0.861  | 0.897  | 0.906  |
0.941  | 0.868  | 100.0%  | 100   |
> | ovn_network.wait_port_ping       | 7.153  | 7.183  | 7.214  | 7.22   |
7.237  | 7.185  | 100.0%  | 100   |
> | total                            | 10.373 | 10.479 | 10.544 | 10.551 |
10.581 | 10.483 | 100.0%  | 100   |
>
+----------------------------------+--------+--------+--------+--------+--------+--------+---------+-------+
> Load duration: 1048.8911039829254
> Full duration: 1050.4055325984955
>
> Below are the results with these patches
>
>
+-------------------------------------------------------------------------------------------------------+
> |                                         Response Times (sec)
                               |
>
+----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+
> | action                           | min   | median | 90%ile | 95%ile |
max   | avg   | success | count |
>
+----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+
> | ovn.create_or_update_address_set | 0.479 | 0.492  | 0.513  | 0.52   |
0.531 | 0.495 | 100.0%  | 100   |
> | ovn.create_port_acls             | 0.946 | 0.964  | 0.998  | 1.001  |
1.041 | 0.969 | 100.0%  | 100   |
> | ovn_network.bind_port            | 1.22  | 1.297  | 1.342  | 1.36   |
1.402 | 1.298 | 100.0%  | 100   |
> | ovn.bind_ovs_vm                  | 0.373 | 0.418  | 0.436  | 0.455  |
0.472 | 0.42  | 100.0%  | 100   |
> | ovn.bind_internal_vm             | 0.818 | 0.88   | 0.911  | 0.93   |
0.982 | 0.878 | 100.0%  | 100   |
> | ovn_network.wait_port_ping       | 3.812 | 3.854  | 3.906  | 3.934  |
4.015 | 3.861 | 100.0%  | 100   |
> | total                            | 6.977 | 7.165  | 7.277  | 7.308  |
7.401 | 7.176 | 100.0%  | 100   |
>
+----------------------------------+-------+--------+--------+--------+-------+-------+---------+-------+
> Load duration: 718.401807308197
> Full duration: 719.8932237625122
>
>
> Testing the same with fresh OVN dbs didn't show any improvements in the
> timings.
>
>

Hi Numan,

Thanks for taking this hard rock. The result looks promising!
I haven't finished reviewing all the patches yet, but I have some comments
that I think are worth discussing as early as possible, so I send them for
now. Please find them in my reply for patch 1, 2, 3 and 6.

Thanks,
Han

> RFC v2 -> v1
> ---------
>  * Fixed the 2 failing test cases.
>  * Updated the commit messages.
>
>
> RFC v1 -> RFC v2
> ---------
>  * Added 2 new patches
>  * Patch 5 (ofctrl_check_and_add_flow) was submitted earlier too and
>    the previous discussion is here -
https://patchwork.ozlabs.org/patch/1202417/
>  * Patch 6 handles I-P for ct_zone and OVS interface changes in
>    flow_output_run stage.
> Numan Siddique (6):
>   Refactor binding_run()to take two context argument - binding_ctx_in
>     and binding_ctx_out.
>   ovn-controller: Refactor binding.c
>   ovn-controller: I-P for port binding in runtime_data stage
>   ovn-controller: I-P for datapath binding
>   ofctrl_check_and_add_flow: Replace the actions of an existing flow if
>     actions have changed.
>   ovn-controller: I-P for ct zone  and OV
>
>
> Numan Siddique (6):
>   Refactor binding_run()to take two context argument - binding_ctx_in
>     and binding_ctx_out.
>   ovn-controller: Store the local port bindings in the runtime data I-P
>     state.
>   ovn-controller: I-P for SB port binding and OVS interface in
>     runtime_data.
>   ovn-controller: I-P for datapath binding
>   ofctrl_check_and_add_flow: Replace the actions of an existing flow if
>     actions have changed.
>   ovn-controller: I-P for ct zone and OVS interface changes in flow
>     output stage.
>
>  controller/binding.c        | 1112 ++++++++++++++++++++++++-----------
>  controller/binding.h        |   58 +-
>  controller/lflow.c          |   13 +
>  controller/lflow.h          |    2 +
>  controller/ofctrl.c         |   23 +-
>  controller/ovn-controller.c |  332 ++++++++---
>  controller/ovn-controller.h |   22 +
>  controller/physical.c       |   48 ++
>  controller/physical.h       |    5 +-
>  controller/pinctrl.c        |   19 +-
>  controller/pinctrl.h        |    4 +-
>  tests/ovn-performance.at    |   22 +-
>  12 files changed, 1197 insertions(+), 463 deletions(-)
>
> --
> 2.24.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev