Re: [ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
On Tue, Jan 9, 2024 at 1:18 AM Han Zhou wrote: > > On Mon, Jan 8, 2024 at 3:52 PM Numan Siddique wrote: > > > > On Fri, Jan 5, 2024 at 11:36 AM Numan Siddique wrote: > > > > > > On Tue, Dec 19, 2023 at 2:37 AM Han Zhou wrote: > > > > > > > > On Mon, Nov 27, 2023 at 6:39 PM wrote: > > > > > > > > > > From: Numan Siddique > > > > > > > > > > Any changes to northd engine node due to load balancers > > > > > are now handled in 'sync_to_sb_lb' node to sync the changed > > > > > load balancers to SB load balancers. > > > > > > > > > > The logic to sync the SB load balancers is changed a bit and it > > > > > now mimics the SB lflow sync. > > > > > > > > > > Below are the scale testing results done with all the patches > applied > > > > > in this series using ovn-heater. The test ran the scenario - > > > > > ocp-500-density-heavy.yml [1]. > > > > > > > > > > The resuts are: > > > > > > > > > > > > > > > --- > > > > > Min (s) Median (s) 90%ile (s) > > > > 99%ile (s) Max (s) Mean (s)Total (s) Count > > > > Failed > > > > > > > > > > --- > > > > > Iteration Total 0.1368831.1290161.192001 > > > > 1.2041671.2127280.66501783.127099 125 > 0 > > > > > Namespace.add_ports 0.0052160.0057360.007034 > > > > 0.0154860.0189780.0062110.776373125 > 0 > > > > > WorkerNode.bind_port0.0350300.0460820.052469 > > > > 0.0582930.0603110.04597311.493259 250 > 0 > > > > > WorkerNode.ping_port0.0050570.0067271.047692 > > > > 1.0692531.0713360.26689666.724094 250 > 0 > > > > > > > > > > --- > > > > > > > > > > The results with the present main [2] are: > > > > > > > > > > > > > > > --- > > > > > Min (s) Median (s) 90%ile (s) > > > > 99%ile (s) Max (s) Mean (s)Total (s) Count > > > > Failed > > > > > > > > > > --- > > > > > Iteration Total 0.1354912.2238053.311270 > > > > 3.3390783.3453461.729172216.146495 125 > 0 > > > > > Namespace.add_ports 0.0053800.0057440.006819 > > > > 0.0187730.0208000.0062920.786532125 > 0 > > > > > WorkerNode.bind_port0.0341790.0460550.053488 > > > > 0.0588010.0710430.04611711.529311 250 > 0 > > > > > WorkerNode.ping_port0.0049560.0069523.086952 > > > > 3.1917433.1928070.791544197.886026 250 > 0 > > > > > > > > > > --- > > > > > > > > > > [1] - > > > > > https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml > > > > > [2] - 2a12cda890a7("controller, northd: Wait for cleanup before > replying > > > > to exit") > > > > > > > > > > Signed-off-by: Numan Siddique > > > > > --- > > > > > northd/en-sync-sb.c | 445 > +-- > > > > > northd/inc-proc-northd.c | 1 + > > > > > northd/lflow-mgr.c | 196 ++--- > > > > > northd/lflow-mgr.h | 23 +- > > > > > northd/northd.c | 238 - > > > > > northd/northd.h | 6 - > > > > > tests/ovn-northd.at | 103 + > > > > > 7 files changed, 585 insertions(+), 427 deletions(-) > > > > > > > > > > diff --git a/northd/en-sync-sb.c b/northd/en-sync-sb.c > > > > > index 73b30272c4..62c5dbd20f 100644 > > > > > --- a/northd/en-sync-sb.c > > > > > +++ b/northd/en-sync-sb.c > > > > > @@ -30,6 +30,7 @@ > > > > > #include "lib/ovn-nb-idl.h" > > > > > #include "lib/ovn-sb-idl.h" > > > > > #include "lib/ovn-util.h" > > > > > +#include "lflow-mgr.h" > > > > > #include "northd.h" > > > > > > > > > > #include "openvswitch/vlog.h" > > > > > @@ -53,6 +54,38 @@ static void build_port_group_address_set(const > struct > > > > nbrec_port_group *, > > > > > struct
Re: [ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
On Mon, Jan 8, 2024 at 3:52 PM Numan Siddique wrote: > > On Fri, Jan 5, 2024 at 11:36 AM Numan Siddique wrote: > > > > On Tue, Dec 19, 2023 at 2:37 AM Han Zhou wrote: > > > > > > On Mon, Nov 27, 2023 at 6:39 PM wrote: > > > > > > > > From: Numan Siddique > > > > > > > > Any changes to northd engine node due to load balancers > > > > are now handled in 'sync_to_sb_lb' node to sync the changed > > > > load balancers to SB load balancers. > > > > > > > > The logic to sync the SB load balancers is changed a bit and it > > > > now mimics the SB lflow sync. > > > > > > > > Below are the scale testing results done with all the patches applied > > > > in this series using ovn-heater. The test ran the scenario - > > > > ocp-500-density-heavy.yml [1]. > > > > > > > > The resuts are: > > > > > > > > > > > --- > > > > Min (s) Median (s) 90%ile (s) > > > 99%ile (s) Max (s) Mean (s)Total (s) Count > > > Failed > > > > > > > --- > > > > Iteration Total 0.1368831.1290161.192001 > > > 1.2041671.2127280.66501783.127099 125 0 > > > > Namespace.add_ports 0.0052160.0057360.007034 > > > 0.0154860.0189780.0062110.776373125 0 > > > > WorkerNode.bind_port0.0350300.0460820.052469 > > > 0.0582930.0603110.04597311.493259 250 0 > > > > WorkerNode.ping_port0.0050570.0067271.047692 > > > 1.0692531.0713360.26689666.724094 250 0 > > > > > > > --- > > > > > > > > The results with the present main [2] are: > > > > > > > > > > > --- > > > > Min (s) Median (s) 90%ile (s) > > > 99%ile (s) Max (s) Mean (s)Total (s) Count > > > Failed > > > > > > > --- > > > > Iteration Total 0.1354912.2238053.311270 > > > 3.3390783.3453461.729172216.146495 125 0 > > > > Namespace.add_ports 0.0053800.0057440.006819 > > > 0.0187730.0208000.0062920.786532125 0 > > > > WorkerNode.bind_port0.0341790.0460550.053488 > > > 0.0588010.0710430.04611711.529311 250 0 > > > > WorkerNode.ping_port0.0049560.0069523.086952 > > > 3.1917433.1928070.791544197.886026 250 0 > > > > > > > --- > > > > > > > > [1] - > > > https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml > > > > [2] - 2a12cda890a7("controller, northd: Wait for cleanup before replying > > > to exit") > > > > > > > > Signed-off-by: Numan Siddique > > > > --- > > > > northd/en-sync-sb.c | 445 +-- > > > > northd/inc-proc-northd.c | 1 + > > > > northd/lflow-mgr.c | 196 ++--- > > > > northd/lflow-mgr.h | 23 +- > > > > northd/northd.c | 238 - > > > > northd/northd.h | 6 - > > > > tests/ovn-northd.at | 103 + > > > > 7 files changed, 585 insertions(+), 427 deletions(-) > > > > > > > > diff --git a/northd/en-sync-sb.c b/northd/en-sync-sb.c > > > > index 73b30272c4..62c5dbd20f 100644 > > > > --- a/northd/en-sync-sb.c > > > > +++ b/northd/en-sync-sb.c > > > > @@ -30,6 +30,7 @@ > > > > #include "lib/ovn-nb-idl.h" > > > > #include "lib/ovn-sb-idl.h" > > > > #include "lib/ovn-util.h" > > > > +#include "lflow-mgr.h" > > > > #include "northd.h" > > > > > > > > #include "openvswitch/vlog.h" > > > > @@ -53,6 +54,38 @@ static void build_port_group_address_set(const struct > > > nbrec_port_group *, > > > > struct svec *ipv4_addrs, > > > > struct svec *ipv6_addrs); > > > > > > > > +struct sb_lb_table; > > > > +struct sb_lb_record; > > > > +static void sb_lb_table_init(struct sb_lb_table *); > > > > +static void sb_lb_table_clear(struct
Re: [ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
On Fri, Jan 5, 2024 at 11:36 AM Numan Siddique wrote: > > On Tue, Dec 19, 2023 at 2:37 AM Han Zhou wrote: > > > > On Mon, Nov 27, 2023 at 6:39 PM wrote: > > > > > > From: Numan Siddique > > > > > > Any changes to northd engine node due to load balancers > > > are now handled in 'sync_to_sb_lb' node to sync the changed > > > load balancers to SB load balancers. > > > > > > The logic to sync the SB load balancers is changed a bit and it > > > now mimics the SB lflow sync. > > > > > > Below are the scale testing results done with all the patches applied > > > in this series using ovn-heater. The test ran the scenario - > > > ocp-500-density-heavy.yml [1]. > > > > > > The resuts are: > > > > > > > > --- > > > Min (s) Median (s) 90%ile (s) > > 99%ile (s) Max (s) Mean (s)Total (s) Count > > Failed > > > > > --- > > > Iteration Total 0.1368831.1290161.192001 > > 1.2041671.2127280.66501783.127099 125 0 > > > Namespace.add_ports 0.0052160.0057360.007034 > > 0.0154860.0189780.0062110.776373125 0 > > > WorkerNode.bind_port0.0350300.0460820.052469 > > 0.0582930.0603110.04597311.493259 250 0 > > > WorkerNode.ping_port0.0050570.0067271.047692 > > 1.0692531.0713360.26689666.724094 250 0 > > > > > --- > > > > > > The results with the present main [2] are: > > > > > > > > --- > > > Min (s) Median (s) 90%ile (s) > > 99%ile (s) Max (s) Mean (s)Total (s) Count > > Failed > > > > > --- > > > Iteration Total 0.1354912.2238053.311270 > > 3.3390783.3453461.729172216.146495 125 0 > > > Namespace.add_ports 0.0053800.0057440.006819 > > 0.0187730.0208000.0062920.786532125 0 > > > WorkerNode.bind_port0.0341790.0460550.053488 > > 0.0588010.0710430.04611711.529311 250 0 > > > WorkerNode.ping_port0.0049560.0069523.086952 > > 3.1917433.1928070.791544197.886026 250 0 > > > > > --- > > > > > > [1] - > > https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml > > > [2] - 2a12cda890a7("controller, northd: Wait for cleanup before replying > > to exit") > > > > > > Signed-off-by: Numan Siddique > > > --- > > > northd/en-sync-sb.c | 445 +-- > > > northd/inc-proc-northd.c | 1 + > > > northd/lflow-mgr.c | 196 ++--- > > > northd/lflow-mgr.h | 23 +- > > > northd/northd.c | 238 - > > > northd/northd.h | 6 - > > > tests/ovn-northd.at | 103 + > > > 7 files changed, 585 insertions(+), 427 deletions(-) > > > > > > diff --git a/northd/en-sync-sb.c b/northd/en-sync-sb.c > > > index 73b30272c4..62c5dbd20f 100644 > > > --- a/northd/en-sync-sb.c > > > +++ b/northd/en-sync-sb.c > > > @@ -30,6 +30,7 @@ > > > #include "lib/ovn-nb-idl.h" > > > #include "lib/ovn-sb-idl.h" > > > #include "lib/ovn-util.h" > > > +#include "lflow-mgr.h" > > > #include "northd.h" > > > > > > #include "openvswitch/vlog.h" > > > @@ -53,6 +54,38 @@ static void build_port_group_address_set(const struct > > nbrec_port_group *, > > > struct svec *ipv4_addrs, > > > struct svec *ipv6_addrs); > > > > > > +struct sb_lb_table; > > > +struct sb_lb_record; > > > +static void sb_lb_table_init(struct sb_lb_table *); > > > +static void sb_lb_table_clear(struct sb_lb_table *); > > > +static struct sb_lb_record *sb_lb_table_find(struct hmap *sb_lbs, > > > + const struct uuid *); > > > +static void sb_lb_table_build_and_sync(struct sb_lb_table *, > > > +
Re: [ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
On Tue, Dec 19, 2023 at 2:37 AM Han Zhou wrote: > > On Mon, Nov 27, 2023 at 6:39 PM wrote: > > > > From: Numan Siddique > > > > Any changes to northd engine node due to load balancers > > are now handled in 'sync_to_sb_lb' node to sync the changed > > load balancers to SB load balancers. > > > > The logic to sync the SB load balancers is changed a bit and it > > now mimics the SB lflow sync. > > > > Below are the scale testing results done with all the patches applied > > in this series using ovn-heater. The test ran the scenario - > > ocp-500-density-heavy.yml [1]. > > > > The resuts are: > > > > > --- > > Min (s) Median (s) 90%ile (s) > 99%ile (s) Max (s) Mean (s)Total (s) Count > Failed > > > --- > > Iteration Total 0.1368831.1290161.192001 > 1.2041671.2127280.66501783.127099 125 0 > > Namespace.add_ports 0.0052160.0057360.007034 > 0.0154860.0189780.0062110.776373125 0 > > WorkerNode.bind_port0.0350300.0460820.052469 > 0.0582930.0603110.04597311.493259 250 0 > > WorkerNode.ping_port0.0050570.0067271.047692 > 1.0692531.0713360.26689666.724094 250 0 > > > --- > > > > The results with the present main [2] are: > > > > > --- > > Min (s) Median (s) 90%ile (s) > 99%ile (s) Max (s) Mean (s)Total (s) Count > Failed > > > --- > > Iteration Total 0.1354912.2238053.311270 > 3.3390783.3453461.729172216.146495 125 0 > > Namespace.add_ports 0.0053800.0057440.006819 > 0.0187730.0208000.0062920.786532125 0 > > WorkerNode.bind_port0.0341790.0460550.053488 > 0.0588010.0710430.04611711.529311 250 0 > > WorkerNode.ping_port0.0049560.0069523.086952 > 3.1917433.1928070.791544197.886026 250 0 > > > --- > > > > [1] - > https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml > > [2] - 2a12cda890a7("controller, northd: Wait for cleanup before replying > to exit") > > > > Signed-off-by: Numan Siddique > > --- > > northd/en-sync-sb.c | 445 +-- > > northd/inc-proc-northd.c | 1 + > > northd/lflow-mgr.c | 196 ++--- > > northd/lflow-mgr.h | 23 +- > > northd/northd.c | 238 - > > northd/northd.h | 6 - > > tests/ovn-northd.at | 103 + > > 7 files changed, 585 insertions(+), 427 deletions(-) > > > > diff --git a/northd/en-sync-sb.c b/northd/en-sync-sb.c > > index 73b30272c4..62c5dbd20f 100644 > > --- a/northd/en-sync-sb.c > > +++ b/northd/en-sync-sb.c > > @@ -30,6 +30,7 @@ > > #include "lib/ovn-nb-idl.h" > > #include "lib/ovn-sb-idl.h" > > #include "lib/ovn-util.h" > > +#include "lflow-mgr.h" > > #include "northd.h" > > > > #include "openvswitch/vlog.h" > > @@ -53,6 +54,38 @@ static void build_port_group_address_set(const struct > nbrec_port_group *, > > struct svec *ipv4_addrs, > > struct svec *ipv6_addrs); > > > > +struct sb_lb_table; > > +struct sb_lb_record; > > +static void sb_lb_table_init(struct sb_lb_table *); > > +static void sb_lb_table_clear(struct sb_lb_table *); > > +static struct sb_lb_record *sb_lb_table_find(struct hmap *sb_lbs, > > + const struct uuid *); > > +static void sb_lb_table_build_and_sync(struct sb_lb_table *, > > +struct ovsdb_idl_txn *ovnsb_txn, > > +const struct sbrec_load_balancer_table *, > > +const struct > sbrec_logical_dp_group_table *, > > +
Re: [ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
On 12/20/23 19:03, Numan Siddique wrote: > On Mon, Dec 18, 2023 at 9:08 AM Dumitru Ceara wrote: >> >> On 11/28/23 03:38, num...@ovn.org wrote: >>> From: Numan Siddique >>> >>> Any changes to northd engine node due to load balancers >>> are now handled in 'sync_to_sb_lb' node to sync the changed >>> load balancers to SB load balancers. >>> >>> The logic to sync the SB load balancers is changed a bit and it >>> now mimics the SB lflow sync. >>> >>> Below are the scale testing results done with all the patches applied >>> in this series using ovn-heater. The test ran the scenario - >>> ocp-500-density-heavy.yml [1]. >>> >>> The resuts are: >>> >>> --- >>> Min (s) Median (s) 90%ile (s) >>> 99%ile (s) Max (s) Mean (s)Total (s) Count >>> Failed >>> --- >>> Iteration Total 0.1368831.1290161.192001 >>> 1.2041671.2127280.66501783.127099 125 0 >>> Namespace.add_ports 0.0052160.0057360.007034 >>> 0.0154860.0189780.0062110.776373125 0 >>> WorkerNode.bind_port 0.0350300.0460820.052469 >>> 0.0582930.0603110.04597311.493259 250 0 >>> WorkerNode.ping_port 0.0050570.0067271.047692 >>> 1.0692531.0713360.26689666.724094 250 0 >>> --- >>> >>> The results with the present main [2] are: >>> >>> --- >>> Min (s) Median (s) 90%ile (s) >>> 99%ile (s) Max (s) Mean (s)Total (s) Count >>> Failed >>> --- >>> Iteration Total 0.1354912.2238053.311270 >>> 3.3390783.3453461.729172216.146495 125 0 >>> Namespace.add_ports 0.0053800.0057440.006819 >>> 0.0187730.0208000.0062920.786532125 0 >>> WorkerNode.bind_port 0.0341790.0460550.053488 >>> 0.0588010.0710430.04611711.529311 250 0 >>> WorkerNode.ping_port 0.0049560.0069523.086952 >>> 3.1917433.1928070.791544197.886026 250 0 >>> --- >>> >>> [1] - >>> https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml >>> [2] - 2a12cda890a7("controller, northd: Wait for cleanup before replying to >>> exit") >>> >>> Signed-off-by: Numan Siddique >>> --- >>> northd/en-sync-sb.c | 445 +-- >>> northd/inc-proc-northd.c | 1 + >>> northd/lflow-mgr.c | 196 ++--- >>> northd/lflow-mgr.h | 23 +- >>> northd/northd.c | 238 - >>> northd/northd.h | 6 - >>> tests/ovn-northd.at | 103 + >>> 7 files changed, 585 insertions(+), 427 deletions(-) >>> >> >> Hi Numan, >> >> The only reason why we need to not ignore SB.LB updates is because we >> need to check for duplicates that under normal circumstances do not >> exist. They can appear due to "spurious" [0] inserts because the LB >> table doesn't have an index defined. >> >> Would it be less of an effort to just have a periodic task (we do >> similar work for mac binding aging) and in that task (I-P node run >> function) check for SB load balancer duplicates, remove them and trigger >> a full recompute? >> >> Wouldn't that be less error prone than all the I-P code? > > Hi Dumitru, > > Thanks for the reviews. > > Do you mean that by adding this periodic task, we can drop this patch ? > > This patch doesn't do any changes to the existing code which handles > the duplicates. > It adds I-P to the Load balancer changes to the sb lb sync in the > sync_to_sb_lb_northd_handler() function. > > northd node in its tracked data provides the information about deleted > and added/updated load balancers > and sync_to_sb_lb_northd_handler() calls sync_changed_lbs() to sync > the changed LBs in the SB DB. > > Before
Re: [ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
On Mon, Dec 18, 2023 at 9:08 AM Dumitru Ceara wrote: > > On 11/28/23 03:38, num...@ovn.org wrote: > > From: Numan Siddique > > > > Any changes to northd engine node due to load balancers > > are now handled in 'sync_to_sb_lb' node to sync the changed > > load balancers to SB load balancers. > > > > The logic to sync the SB load balancers is changed a bit and it > > now mimics the SB lflow sync. > > > > Below are the scale testing results done with all the patches applied > > in this series using ovn-heater. The test ran the scenario - > > ocp-500-density-heavy.yml [1]. > > > > The resuts are: > > > > --- > > Min (s) Median (s) 90%ile (s) > > 99%ile (s) Max (s) Mean (s)Total (s) Count > > Failed > > --- > > Iteration Total 0.1368831.1290161.192001 > > 1.2041671.2127280.66501783.127099 125 0 > > Namespace.add_ports 0.0052160.0057360.007034 > > 0.0154860.0189780.0062110.776373125 0 > > WorkerNode.bind_port 0.0350300.0460820.052469 > > 0.0582930.0603110.04597311.493259 250 0 > > WorkerNode.ping_port 0.0050570.0067271.047692 > > 1.0692531.0713360.26689666.724094 250 0 > > --- > > > > The results with the present main [2] are: > > > > --- > > Min (s) Median (s) 90%ile (s) > > 99%ile (s) Max (s) Mean (s)Total (s) Count > > Failed > > --- > > Iteration Total 0.1354912.2238053.311270 > > 3.3390783.3453461.729172216.146495 125 0 > > Namespace.add_ports 0.0053800.0057440.006819 > > 0.0187730.0208000.0062920.786532125 0 > > WorkerNode.bind_port 0.0341790.0460550.053488 > > 0.0588010.0710430.04611711.529311 250 0 > > WorkerNode.ping_port 0.0049560.0069523.086952 > > 3.1917433.1928070.791544197.886026 250 0 > > --- > > > > [1] - > > https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml > > [2] - 2a12cda890a7("controller, northd: Wait for cleanup before replying to > > exit") > > > > Signed-off-by: Numan Siddique > > --- > > northd/en-sync-sb.c | 445 +-- > > northd/inc-proc-northd.c | 1 + > > northd/lflow-mgr.c | 196 ++--- > > northd/lflow-mgr.h | 23 +- > > northd/northd.c | 238 - > > northd/northd.h | 6 - > > tests/ovn-northd.at | 103 + > > 7 files changed, 585 insertions(+), 427 deletions(-) > > > > Hi Numan, > > The only reason why we need to not ignore SB.LB updates is because we > need to check for duplicates that under normal circumstances do not > exist. They can appear due to "spurious" [0] inserts because the LB > table doesn't have an index defined. > > Would it be less of an effort to just have a periodic task (we do > similar work for mac binding aging) and in that task (I-P node run > function) check for SB load balancer duplicates, remove them and trigger > a full recompute? > > Wouldn't that be less error prone than all the I-P code? Hi Dumitru, Thanks for the reviews. Do you mean that by adding this periodic task, we can drop this patch ? This patch doesn't do any changes to the existing code which handles the duplicates. It adds I-P to the Load balancer changes to the sb lb sync in the sync_to_sb_lb_northd_handler() function. northd node in its tracked data provides the information about deleted and added/updated load balancers and sync_to_sb_lb_northd_handler() calls sync_changed_lbs() to sync the changed LBs in the SB DB. Before this patch any change to the NB load balancers/lb groups resulted in the sync_to_sb_lb full
Re: [ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
On Mon, Nov 27, 2023 at 6:39 PM wrote: > > From: Numan Siddique > > Any changes to northd engine node due to load balancers > are now handled in 'sync_to_sb_lb' node to sync the changed > load balancers to SB load balancers. > > The logic to sync the SB load balancers is changed a bit and it > now mimics the SB lflow sync. > > Below are the scale testing results done with all the patches applied > in this series using ovn-heater. The test ran the scenario - > ocp-500-density-heavy.yml [1]. > > The resuts are: > > --- > Min (s) Median (s) 90%ile (s) 99%ile (s) Max (s) Mean (s)Total (s) Count Failed > --- > Iteration Total 0.1368831.1290161.192001 1.2041671.2127280.66501783.127099 125 0 > Namespace.add_ports 0.0052160.0057360.007034 0.0154860.0189780.0062110.776373125 0 > WorkerNode.bind_port0.0350300.0460820.052469 0.0582930.0603110.04597311.493259 250 0 > WorkerNode.ping_port0.0050570.0067271.047692 1.0692531.0713360.26689666.724094 250 0 > --- > > The results with the present main [2] are: > > --- > Min (s) Median (s) 90%ile (s) 99%ile (s) Max (s) Mean (s)Total (s) Count Failed > --- > Iteration Total 0.1354912.2238053.311270 3.3390783.3453461.729172216.146495 125 0 > Namespace.add_ports 0.0053800.0057440.006819 0.0187730.0208000.0062920.786532125 0 > WorkerNode.bind_port0.0341790.0460550.053488 0.0588010.0710430.04611711.529311 250 0 > WorkerNode.ping_port0.0049560.0069523.086952 3.1917433.1928070.791544197.886026 250 0 > --- > > [1] - https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml > [2] - 2a12cda890a7("controller, northd: Wait for cleanup before replying to exit") > > Signed-off-by: Numan Siddique > --- > northd/en-sync-sb.c | 445 +-- > northd/inc-proc-northd.c | 1 + > northd/lflow-mgr.c | 196 ++--- > northd/lflow-mgr.h | 23 +- > northd/northd.c | 238 - > northd/northd.h | 6 - > tests/ovn-northd.at | 103 + > 7 files changed, 585 insertions(+), 427 deletions(-) > > diff --git a/northd/en-sync-sb.c b/northd/en-sync-sb.c > index 73b30272c4..62c5dbd20f 100644 > --- a/northd/en-sync-sb.c > +++ b/northd/en-sync-sb.c > @@ -30,6 +30,7 @@ > #include "lib/ovn-nb-idl.h" > #include "lib/ovn-sb-idl.h" > #include "lib/ovn-util.h" > +#include "lflow-mgr.h" > #include "northd.h" > > #include "openvswitch/vlog.h" > @@ -53,6 +54,38 @@ static void build_port_group_address_set(const struct nbrec_port_group *, > struct svec *ipv4_addrs, > struct svec *ipv6_addrs); > > +struct sb_lb_table; > +struct sb_lb_record; > +static void sb_lb_table_init(struct sb_lb_table *); > +static void sb_lb_table_clear(struct sb_lb_table *); > +static struct sb_lb_record *sb_lb_table_find(struct hmap *sb_lbs, > + const struct uuid *); > +static void sb_lb_table_build_and_sync(struct sb_lb_table *, > +struct ovsdb_idl_txn *ovnsb_txn, > +const struct sbrec_load_balancer_table *, > +const struct sbrec_logical_dp_group_table *, > +struct hmap *lb_dps_map, > +struct ovn_datapaths *ls_datapaths, > +struct ovn_datapaths *lr_datapaths, > +struct chassis_features *); > +static void
Re: [ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
On 11/28/23 03:38, num...@ovn.org wrote: > From: Numan Siddique > > Any changes to northd engine node due to load balancers > are now handled in 'sync_to_sb_lb' node to sync the changed > load balancers to SB load balancers. > > The logic to sync the SB load balancers is changed a bit and it > now mimics the SB lflow sync. > > Below are the scale testing results done with all the patches applied > in this series using ovn-heater. The test ran the scenario - > ocp-500-density-heavy.yml [1]. > > The resuts are: > > --- > Min (s) Median (s) 90%ile (s) 99%ile > (s) Max (s) Mean (s)Total (s) Count Failed > --- > Iteration Total 0.1368831.1290161.192001 > 1.2041671.2127280.66501783.127099 125 0 > Namespace.add_ports 0.0052160.0057360.007034 > 0.0154860.0189780.0062110.776373125 0 > WorkerNode.bind_port 0.0350300.0460820.052469 > 0.0582930.0603110.04597311.493259 250 0 > WorkerNode.ping_port 0.0050570.0067271.047692 > 1.0692531.0713360.26689666.724094 250 0 > --- > > The results with the present main [2] are: > > --- > Min (s) Median (s) 90%ile (s) 99%ile > (s) Max (s) Mean (s)Total (s) Count Failed > --- > Iteration Total 0.1354912.2238053.311270 > 3.3390783.3453461.729172216.146495 125 0 > Namespace.add_ports 0.0053800.0057440.006819 > 0.0187730.0208000.0062920.786532125 0 > WorkerNode.bind_port 0.0341790.0460550.053488 > 0.0588010.0710430.04611711.529311 250 0 > WorkerNode.ping_port 0.0049560.0069523.086952 > 3.1917433.1928070.791544197.886026 250 0 > --- > > [1] - > https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml > [2] - 2a12cda890a7("controller, northd: Wait for cleanup before replying to > exit") > > Signed-off-by: Numan Siddique > --- > northd/en-sync-sb.c | 445 +-- > northd/inc-proc-northd.c | 1 + > northd/lflow-mgr.c | 196 ++--- > northd/lflow-mgr.h | 23 +- > northd/northd.c | 238 - > northd/northd.h | 6 - > tests/ovn-northd.at | 103 + > 7 files changed, 585 insertions(+), 427 deletions(-) > Hi Numan, The only reason why we need to not ignore SB.LB updates is because we need to check for duplicates that under normal circumstances do not exist. They can appear due to "spurious" [0] inserts because the LB table doesn't have an index defined. Would it be less of an effort to just have a periodic task (we do similar work for mac binding aging) and in that task (I-P node run function) check for SB load balancer duplicates, remove them and trigger a full recompute? Wouldn't that be less error prone than all the I-P code? Thanks, Dumitru [0] https://github.com/ovn-org/ovn/commit/9deb000536e0 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH ovn v3 16/16] northd: Add northd change handler for sync_to_sb_lb node.
From: Numan Siddique Any changes to northd engine node due to load balancers are now handled in 'sync_to_sb_lb' node to sync the changed load balancers to SB load balancers. The logic to sync the SB load balancers is changed a bit and it now mimics the SB lflow sync. Below are the scale testing results done with all the patches applied in this series using ovn-heater. The test ran the scenario - ocp-500-density-heavy.yml [1]. The resuts are: --- Min (s) Median (s) 90%ile (s) 99%ile (s) Max (s) Mean (s)Total (s) Count Failed --- Iteration Total 0.1368831.1290161.192001 1.2041671.2127280.66501783.127099 125 0 Namespace.add_ports 0.0052160.0057360.007034 0.0154860.0189780.0062110.776373125 0 WorkerNode.bind_port0.0350300.0460820.052469 0.0582930.0603110.04597311.493259 250 0 WorkerNode.ping_port0.0050570.0067271.047692 1.0692531.0713360.26689666.724094 250 0 --- The results with the present main [2] are: --- Min (s) Median (s) 90%ile (s) 99%ile (s) Max (s) Mean (s)Total (s) Count Failed --- Iteration Total 0.1354912.2238053.311270 3.3390783.3453461.729172216.146495 125 0 Namespace.add_ports 0.0053800.0057440.006819 0.0187730.0208000.0062920.786532125 0 WorkerNode.bind_port0.0341790.0460550.053488 0.0588010.0710430.04611711.529311 250 0 WorkerNode.ping_port0.0049560.0069523.086952 3.1917433.1928070.791544197.886026 250 0 --- [1] - https://github.com/ovn-org/ovn-heater/blob/main/test-scenarios/ocp-500-density-heavy.yml [2] - 2a12cda890a7("controller, northd: Wait for cleanup before replying to exit") Signed-off-by: Numan Siddique --- northd/en-sync-sb.c | 445 +-- northd/inc-proc-northd.c | 1 + northd/lflow-mgr.c | 196 ++--- northd/lflow-mgr.h | 23 +- northd/northd.c | 238 - northd/northd.h | 6 - tests/ovn-northd.at | 103 + 7 files changed, 585 insertions(+), 427 deletions(-) diff --git a/northd/en-sync-sb.c b/northd/en-sync-sb.c index 73b30272c4..62c5dbd20f 100644 --- a/northd/en-sync-sb.c +++ b/northd/en-sync-sb.c @@ -30,6 +30,7 @@ #include "lib/ovn-nb-idl.h" #include "lib/ovn-sb-idl.h" #include "lib/ovn-util.h" +#include "lflow-mgr.h" #include "northd.h" #include "openvswitch/vlog.h" @@ -53,6 +54,38 @@ static void build_port_group_address_set(const struct nbrec_port_group *, struct svec *ipv4_addrs, struct svec *ipv6_addrs); +struct sb_lb_table; +struct sb_lb_record; +static void sb_lb_table_init(struct sb_lb_table *); +static void sb_lb_table_clear(struct sb_lb_table *); +static struct sb_lb_record *sb_lb_table_find(struct hmap *sb_lbs, + const struct uuid *); +static void sb_lb_table_build_and_sync(struct sb_lb_table *, +struct ovsdb_idl_txn *ovnsb_txn, +const struct sbrec_load_balancer_table *, +const struct sbrec_logical_dp_group_table *, +struct hmap *lb_dps_map, +struct ovn_datapaths *ls_datapaths, +struct ovn_datapaths *lr_datapaths, +struct chassis_features *); +static void sync_sb_lb_record(struct sb_lb_record *, + const struct sbrec_load_balancer *, +