diff mbox series

[ovs-dev,3/3] perf-northd.at: Add ovn-northd recompute statistics.

Message ID 170083924328.2385884.251274887513600174.stgit@dceara.remote.csb
State Accepted
Headers show
Series Improve in-tree ovn-northd perf testing. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Dumitru Ceara Nov. 24, 2023, 3:20 p.m. UTC
Trigger a full recompute after each DB build run and record the
results.

Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 tests/perf-northd.at |   29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

Comments

Mark Michelson Dec. 4, 2023, 7:12 p.m. UTC | #1
Thanks, Dumitru.

Acked-by: Mark Michelson <mmichels@redhat.com>

On 11/24/23 10:20, Dumitru Ceara wrote:
> Trigger a full recompute after each DB build run and record the
> results.
> 
> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> ---
>   tests/perf-northd.at |   29 ++++++++++++++++++++---------
>   1 file changed, 20 insertions(+), 9 deletions(-)
> 
> diff --git a/tests/perf-northd.at b/tests/perf-northd.at
> index 16f1bcf453..ba38117bd4 100644
> --- a/tests/perf-northd.at
> +++ b/tests/perf-northd.at
> @@ -9,6 +9,18 @@ m4_define([CACHE_NBDB],[
>       cp -f ${ovs_base}/ovn-nb/ovn-nb.db ${at_suite_dir}/cached/${at_group}/
>   ])
>   
> +# MEASURE_RECOMPUTE()
> +#
> +# Triggers a full ovn-northd recompute and records performance
> +# (stopwatch) counters.
> +#
> +m4_define([MEASURE_RECOMPUTE],[
> +    PERF_RECORD_START(Measure northd recompute)
> +    ovn-appctl -t northd/NORTHD_TYPE inc-engine/recompute
> +    ovn-nbctl --wait=sb sync
> +    PERF_RECORD_STOP()
> +])
> +
>   # BUILD_NBDB([COMMANDS])
>   #
>   # Configure the northbound database using COMMANDS.
> @@ -19,6 +31,7 @@ m4_define([CACHE_NBDB],[
>   # northbound database.
>   #
>   m4_define([BUILD_NBDB],[
> +    PERF_RECORD_START(Build NB)
>       if [[ ! -f ${at_suite_dir}/cached/${at_group}/ovn-nb.db ]] || [[ $at_arg_rebuild != false ]]; then
>           echo "Rebuild NBDB"
>           $1
> @@ -30,15 +43,19 @@ m4_define([BUILD_NBDB],[
>           ovn-appctl -t ovn-nb/ovsdb-server ovsdb-server/add-db ${at_suite_dir}/cached/${at_group}/ovn-nb.db
>       fi
>       ovn-nbctl --wait=sb sync
> +    PERF_RECORD_STOP()
> +
> +    MEASURE_RECOMPUTE()
>   ])
>   
> -# PERF_RECORD_BANNER()
> +# PERF_RECORD_BANNER([DESCRIPTION])
>   #
>   # Append standard banner to performance results.
>   #
>   m4_define([PERF_RECORD_START],[
>       echo >> ${at_suite_dir}/results
>       echo "$at_desc_line" >> ${at_suite_dir}/results
> +    echo "  Results for '$1'" >> ${at_suite_dir}/results
>       echo "  ---" >> ${at_suite_dir}/results
>   ])
>   
> @@ -80,6 +97,8 @@ m4_define([PERF_RECORD_STOP], [
>       PERF_RECORD_STOPWATCH(port_group_run, ["Short term average"], [Average (port_group in msec)])
>       PERF_RECORD_STOPWATCH(sync_meters_run, ["Maximum"], [Maximum (sync_meters in msec)])
>       PERF_RECORD_STOPWATCH(sync_meters_run, ["Short term average"], [Average (sync_meters in msec)])
> +
> +    ovn-appctl -t northd/NORTHD_TYPE stopwatch/reset
>   ])
>   
>   OVS_START_SHELL_HELPERS
> @@ -177,24 +196,16 @@ m4_define([OVN_BASIC_SCALE_CONFIG], [
>   
>   OVN_FOR_EACH_NORTHD_NO_HV([
>   AT_SETUP([ovn-northd basic scale test -- 200 Hypervisors, 200 Logical Ports/Hypervisor])
> -PERF_RECORD_START()
> -
>   ovn_start
>   
>   BUILD_NBDB(OVN_BASIC_SCALE_CONFIG(200, 200))
> -
> -PERF_RECORD_STOP()
>   AT_CLEANUP
>   ])
>   
>   OVN_FOR_EACH_NORTHD_NO_HV([
>   AT_SETUP([ovn-northd basic scale test -- 500 Hypervisors, 50 Logical Ports/Hypervisor])
> -PERF_RECORD_START()
> -
>   ovn_start
>   
>   BUILD_NBDB(OVN_BASIC_SCALE_CONFIG(500, 50))
> -
> -PERF_RECORD_STOP()
>   AT_CLEANUP
>   ])
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Numan Siddique Dec. 6, 2023, 9:32 p.m. UTC | #2
On Mon, Dec 4, 2023 at 2:12 PM Mark Michelson <mmichels@redhat.com> wrote:
>
> Thanks, Dumitru.
>
> Acked-by: Mark Michelson <mmichels@redhat.com>

Thanks.

Acked-by: Numan Siddique <numans@ovn.org>

Numan

>
> On 11/24/23 10:20, Dumitru Ceara wrote:
> > Trigger a full recompute after each DB build run and record the
> > results.
> >
> > Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> > ---
> >   tests/perf-northd.at |   29 ++++++++++++++++++++---------
> >   1 file changed, 20 insertions(+), 9 deletions(-)
> >
> > diff --git a/tests/perf-northd.at b/tests/perf-northd.at
> > index 16f1bcf453..ba38117bd4 100644
> > --- a/tests/perf-northd.at
> > +++ b/tests/perf-northd.at
> > @@ -9,6 +9,18 @@ m4_define([CACHE_NBDB],[
> >       cp -f ${ovs_base}/ovn-nb/ovn-nb.db ${at_suite_dir}/cached/${at_group}/
> >   ])
> >
> > +# MEASURE_RECOMPUTE()
> > +#
> > +# Triggers a full ovn-northd recompute and records performance
> > +# (stopwatch) counters.
> > +#
> > +m4_define([MEASURE_RECOMPUTE],[
> > +    PERF_RECORD_START(Measure northd recompute)
> > +    ovn-appctl -t northd/NORTHD_TYPE inc-engine/recompute
> > +    ovn-nbctl --wait=sb sync
> > +    PERF_RECORD_STOP()
> > +])
> > +
> >   # BUILD_NBDB([COMMANDS])
> >   #
> >   # Configure the northbound database using COMMANDS.
> > @@ -19,6 +31,7 @@ m4_define([CACHE_NBDB],[
> >   # northbound database.
> >   #
> >   m4_define([BUILD_NBDB],[
> > +    PERF_RECORD_START(Build NB)
> >       if [[ ! -f ${at_suite_dir}/cached/${at_group}/ovn-nb.db ]] || [[ $at_arg_rebuild != false ]]; then
> >           echo "Rebuild NBDB"
> >           $1
> > @@ -30,15 +43,19 @@ m4_define([BUILD_NBDB],[
> >           ovn-appctl -t ovn-nb/ovsdb-server ovsdb-server/add-db ${at_suite_dir}/cached/${at_group}/ovn-nb.db
> >       fi
> >       ovn-nbctl --wait=sb sync
> > +    PERF_RECORD_STOP()
> > +
> > +    MEASURE_RECOMPUTE()
> >   ])
> >
> > -# PERF_RECORD_BANNER()
> > +# PERF_RECORD_BANNER([DESCRIPTION])
> >   #
> >   # Append standard banner to performance results.
> >   #
> >   m4_define([PERF_RECORD_START],[
> >       echo >> ${at_suite_dir}/results
> >       echo "$at_desc_line" >> ${at_suite_dir}/results
> > +    echo "  Results for '$1'" >> ${at_suite_dir}/results
> >       echo "  ---" >> ${at_suite_dir}/results
> >   ])
> >
> > @@ -80,6 +97,8 @@ m4_define([PERF_RECORD_STOP], [
> >       PERF_RECORD_STOPWATCH(port_group_run, ["Short term average"], [Average (port_group in msec)])
> >       PERF_RECORD_STOPWATCH(sync_meters_run, ["Maximum"], [Maximum (sync_meters in msec)])
> >       PERF_RECORD_STOPWATCH(sync_meters_run, ["Short term average"], [Average (sync_meters in msec)])
> > +
> > +    ovn-appctl -t northd/NORTHD_TYPE stopwatch/reset
> >   ])
> >
> >   OVS_START_SHELL_HELPERS
> > @@ -177,24 +196,16 @@ m4_define([OVN_BASIC_SCALE_CONFIG], [
> >
> >   OVN_FOR_EACH_NORTHD_NO_HV([
> >   AT_SETUP([ovn-northd basic scale test -- 200 Hypervisors, 200 Logical Ports/Hypervisor])
> > -PERF_RECORD_START()
> > -
> >   ovn_start
> >
> >   BUILD_NBDB(OVN_BASIC_SCALE_CONFIG(200, 200))
> > -
> > -PERF_RECORD_STOP()
> >   AT_CLEANUP
> >   ])
> >
> >   OVN_FOR_EACH_NORTHD_NO_HV([
> >   AT_SETUP([ovn-northd basic scale test -- 500 Hypervisors, 50 Logical Ports/Hypervisor])
> > -PERF_RECORD_START()
> > -
> >   ovn_start
> >
> >   BUILD_NBDB(OVN_BASIC_SCALE_CONFIG(500, 50))
> > -
> > -PERF_RECORD_STOP()
> >   AT_CLEANUP
> >   ])
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/tests/perf-northd.at b/tests/perf-northd.at
index 16f1bcf453..ba38117bd4 100644
--- a/tests/perf-northd.at
+++ b/tests/perf-northd.at
@@ -9,6 +9,18 @@  m4_define([CACHE_NBDB],[
     cp -f ${ovs_base}/ovn-nb/ovn-nb.db ${at_suite_dir}/cached/${at_group}/
 ])
 
+# MEASURE_RECOMPUTE()
+#
+# Triggers a full ovn-northd recompute and records performance
+# (stopwatch) counters.
+#
+m4_define([MEASURE_RECOMPUTE],[
+    PERF_RECORD_START(Measure northd recompute)
+    ovn-appctl -t northd/NORTHD_TYPE inc-engine/recompute
+    ovn-nbctl --wait=sb sync
+    PERF_RECORD_STOP()
+])
+
 # BUILD_NBDB([COMMANDS])
 #
 # Configure the northbound database using COMMANDS.
@@ -19,6 +31,7 @@  m4_define([CACHE_NBDB],[
 # northbound database.
 #
 m4_define([BUILD_NBDB],[
+    PERF_RECORD_START(Build NB)
     if [[ ! -f ${at_suite_dir}/cached/${at_group}/ovn-nb.db ]] || [[ $at_arg_rebuild != false ]]; then
         echo "Rebuild NBDB"
         $1
@@ -30,15 +43,19 @@  m4_define([BUILD_NBDB],[
         ovn-appctl -t ovn-nb/ovsdb-server ovsdb-server/add-db ${at_suite_dir}/cached/${at_group}/ovn-nb.db
     fi
     ovn-nbctl --wait=sb sync
+    PERF_RECORD_STOP()
+
+    MEASURE_RECOMPUTE()
 ])
 
-# PERF_RECORD_BANNER()
+# PERF_RECORD_BANNER([DESCRIPTION])
 #
 # Append standard banner to performance results.
 #
 m4_define([PERF_RECORD_START],[
     echo >> ${at_suite_dir}/results
     echo "$at_desc_line" >> ${at_suite_dir}/results
+    echo "  Results for '$1'" >> ${at_suite_dir}/results
     echo "  ---" >> ${at_suite_dir}/results
 ])
 
@@ -80,6 +97,8 @@  m4_define([PERF_RECORD_STOP], [
     PERF_RECORD_STOPWATCH(port_group_run, ["Short term average"], [Average (port_group in msec)])
     PERF_RECORD_STOPWATCH(sync_meters_run, ["Maximum"], [Maximum (sync_meters in msec)])
     PERF_RECORD_STOPWATCH(sync_meters_run, ["Short term average"], [Average (sync_meters in msec)])
+
+    ovn-appctl -t northd/NORTHD_TYPE stopwatch/reset
 ])
 
 OVS_START_SHELL_HELPERS
@@ -177,24 +196,16 @@  m4_define([OVN_BASIC_SCALE_CONFIG], [
 
 OVN_FOR_EACH_NORTHD_NO_HV([
 AT_SETUP([ovn-northd basic scale test -- 200 Hypervisors, 200 Logical Ports/Hypervisor])
-PERF_RECORD_START()
-
 ovn_start
 
 BUILD_NBDB(OVN_BASIC_SCALE_CONFIG(200, 200))
-
-PERF_RECORD_STOP()
 AT_CLEANUP
 ])
 
 OVN_FOR_EACH_NORTHD_NO_HV([
 AT_SETUP([ovn-northd basic scale test -- 500 Hypervisors, 50 Logical Ports/Hypervisor])
-PERF_RECORD_START()
-
 ovn_start
 
 BUILD_NBDB(OVN_BASIC_SCALE_CONFIG(500, 50))
-
-PERF_RECORD_STOP()
 AT_CLEANUP
 ])