Currently ovn-ic recomputes its entire transit-switch/gateway/route
state on every change to the IC databases (or the local NB/SB).  On
large interconnected deployments this full recompute dominates the
ovn-ic runtime and adds significant latency between a configuration
change in one AZ and its propagation to the others.

This series introduces incremental processing (I+P) to ovn-ic, mirroring
the engine-node model already used by ovn-northd and ovn-controller.  The
full recompute is split into per-subsystem engine nodes, and each node
gets an incremental change handler so that a change to a single object no
longer forces a global recompute.

Approach
--------
  - The monolithic recompute is first refactored into per-subsystem
    *_run functions and then into independent engine nodes (az, dp_enum,
    gateway, ts, tr, port_binding, route, service_mon).
  - Each node gains an incremental handler that reacts only to the
    tracked changes on its inputs, falling back to recompute when a
    change cannot be handled incrementally.

Testing
-------
  - make check / make check-ovn-ic all pass.
  - Scale test as above:
    3: perf-ovn-ic.at:233 ovn-ic basic scale test -- 200 VPCs x 3 AZs x 4 TSs:
      incremental vs recompute -- parallelization=yes
    4: perf-ovn-ic.at:239 ovn-ic basic scale test -- 1000 VPCs x 3 AZs x 4 TSs:
      incremental vs recompute -- parallelization=yes

Results
-------

3: ovn-ic basic scale test -- 200 VPCs x 3 AZs x 4 TSs:
  incremental vs recompute -- parallelization=yes

  Results for 'Incremental: +1 VPC at 200-VPC scale (node handler times)'
  ---
  en_ts incremental Maximum (msec): 1
  en_ts incremental Average (msec): 0.015667
  en_tr incremental Maximum (msec): 0
  en_tr incremental Average (msec): 0
  en_route incremental Maximum (msec): 2
  en_route incremental Average (msec): 0.812988
  en_port_binding incremental Maximum (msec): 0
  en_port_binding incremental Average (msec): 0
  en_dp_enum incremental Maximum (msec): 0
  en_dp_enum incremental Average (msec): 0

  3: ovn-ic basic scale test -- 200 VPCs x 3 AZs x 4 TSs:
    incremental vs recompute -- parallelization=yes

  Results for 'Full recompute at 201-VPC scale (node times)'
  ---
  en_ts recompute Maximum (msec): 2
  en_ts recompute Average (msec): 2.000000
  en_tr recompute Maximum (msec): 0
  en_tr recompute Average (msec): 0.000000
  en_route recompute Maximum (msec): 44
  en_route recompute Average (msec): 44.000000
  en_port_binding recompute Maximum (msec): 26
  en_port_binding recompute Average (msec): 26.000000
  en_dp_enum recompute Maximum (msec): 1
  en_dp_enum recompute Average (msec): 1.000000


4: ovn-ic basic scale test -- 1000 VPCs x 3 AZs x 4 TSs:
  incremental vs recompute -- parallelization=yes

  Results for 'Incremental: +1 VPC at 1000-VPC scale (node handler times)'
  ---
  en_ts incremental Maximum (msec): 1
  en_ts incremental Average (msec): 0.301449
  en_tr incremental Maximum (msec): 0
  en_tr incremental Average (msec): 0
  en_route incremental Maximum (msec): 11
  en_route incremental Average (msec): 5.641602
  en_port_binding incremental Maximum (msec): 0
  en_port_binding incremental Average (msec): 0
  en_dp_enum incremental Maximum (msec): 0
  en_dp_enum incremental Average (msec): 0

  4: ovn-ic basic scale test -- 1000 VPCs x 3 AZs x 4 TSs:
  incremental vs recompute -- parallelization=yes

  Results for 'Full recompute at 1001-VPC scale (node times)'
  ---
  en_ts recompute Maximum (msec): 12
  en_ts recompute Average (msec): 12.000000
  en_tr recompute Maximum (msec): 0
  en_tr recompute Average (msec): 0.000000
  en_route recompute Maximum (msec): 307
  en_route recompute Average (msec): 307.000000
  en_port_binding recompute Maximum (msec): 176
  en_port_binding recompute Average (msec): 176.000000
  en_dp_enum recompute Maximum (msec): 6
  en_dp_enum recompute Average (msec): 6.000000

Paulo Guilherme Silva (12):
  northd: Read ic-vxlan_mode as a boolean value, not key presence.
  ic: Prepare *_run functions for engine nodes.
  ic: Split full recompute into per-subsystem engine nodes.
  ic: Add incremental handler for the en_az node.
  ic: Add incremental handler for the en_dp_enum node.
  ic: Add incremental handler for the en_gateway node.
  ic: Add incremental handler for the en_ts node.
  ic: Add incremental handler for the en_tr node.
  ic: Add incremental handler for the en_port_binding node.
  ic: Add incremental handler for the en_route node.
  tests: Add ovn-ic incremental-processing basic scale test.
  ic: Add incremental handler for the en_service_mon node.

 ic/automake.mk            |   18 +
 ic/en-address-set.c       |   45 +
 ic/en-address-set.h       |   13 +
 ic/en-az.c                |  125 ++
 ic/en-az.h                |   26 +
 ic/en-dp-enum.c           |  257 +++
 ic/en-dp-enum.h           |   47 +
 ic/en-gateway.c           |  384 ++++
 ic/en-gateway.h           |   17 +
 ic/en-ic.c                |    9 +-
 ic/en-port-binding.c      | 1551 +++++++++++++++
 ic/en-port-binding.h      |   38 +
 ic/en-route.c             | 2630 ++++++++++++++++++++++++++
 ic/en-route.h             |   41 +
 ic/en-service-monitor.c   |  544 ++++++
 ic/en-service-monitor.h   |   18 +
 ic/en-tr.c                |  226 +++
 ic/en-tr.h                |   17 +
 ic/en-ts.c                |  217 +++
 ic/en-ts.h                |   21 +
 ic/inc-proc-ic.c          |  276 ++-
 ic/ovn-ic.c               | 3768 +++++--------------------------------
 ic/ovn-ic.h               |   54 +-
 northd/en-global-config.c |    4 +-
 tests/automake.mk         |    3 +-
 tests/ovn-ic.at           |  604 ++++++
 tests/perf-ovn-ic.at      |  247 +++
 tests/perf-testsuite.at   |    1 +
 28 files changed, 7818 insertions(+), 3383 deletions(-)
 create mode 100644 ic/en-address-set.c
 create mode 100644 ic/en-address-set.h
 create mode 100644 ic/en-az.c
 create mode 100644 ic/en-az.h
 create mode 100644 ic/en-dp-enum.c
 create mode 100644 ic/en-dp-enum.h
 create mode 100644 ic/en-gateway.c
 create mode 100644 ic/en-gateway.h
 create mode 100644 ic/en-port-binding.c
 create mode 100644 ic/en-port-binding.h
 create mode 100644 ic/en-route.c
 create mode 100644 ic/en-route.h
 create mode 100644 ic/en-service-monitor.c
 create mode 100644 ic/en-service-monitor.h
 create mode 100644 ic/en-tr.c
 create mode 100644 ic/en-tr.h
 create mode 100644 ic/en-ts.c
 create mode 100644 ic/en-ts.h
 create mode 100644 tests/perf-ovn-ic.at

--
2.34.1


-- 




_'Esta mensagem é direcionada apenas para os endereços constantes no 
cabeçalho inicial. Se você não está listado nos endereços constantes no 
cabeçalho, pedimos-lhe que desconsidere completamente o conteúdo dessa 
mensagem e cuja cópia, encaminhamento e/ou execução das ações citadas estão 
imediatamente anuladas e proibidas'._


* **'Apesar do Magazine Luiza tomar 
todas as precauções razoáveis para assegurar que nenhum vírus esteja 
presente nesse e-mail, a empresa não poderá aceitar a responsabilidade por 
quaisquer perdas ou danos causados por esse e-mail ou por seus anexos'.*



_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to