Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202205][counters] Improve performance by polling only configured ports buffer queue/pg counters #2432

Merged

Conversation

nazariig
Copy link
Collaborator

commit 6f1199afc3458e526c26b5d7c498fdaf810fbaca
Author: Shlomi Bitton <[email protected]>
Date:   Sun Jan 2 16:55:58 2022 +0000

Filter unconfigured ports buffers queue/pg counters configurations on init.
If no buffer configurations available, no counters will be created.
Allow creating/removing counters on runtime if buffer PG/Queue is created or removed.
New UT added to verify new flow.

Signed-off-by: Shlomi Bitton <[email protected]>

Signed-off-by: Nazarii Hnydyn [email protected]

Propagating #2143 with resolved merge conflicts
Depends on: sonic-net/sonic-utilities#2239

What I did
Currently in SONiC all ports queue and pg counters are created by default with the max possible amount of counters.
This feature change this behavior to poll only configured counters provided by the config DB BUFFER_PG and BUFFER_QUEUE tables.
If no tables are present in the DB, no counters will be created for ports.
Filter the unwanted queues/pgs returned by SAI API calls and skip the creation of these queue/pg counters.
Also allow creating/removing counters on runtime if buffer PG/Queue is configured or removed.

Why I did it
Improve performance by filtering unconfigured queue/pg counters on init.

How I verified it
Check after enabling the counters, if configured counters created in Counters DB according to the configurations.
Add/Remove buffer PG/Queue configurations and observe the corresponding counters created/removed accordingly.
New UT added to verify this flow.

Details if related

  • N/A

… init

    commit 6f1199a
    Author: Shlomi Bitton <[email protected]>
    Date:   Sun Jan 2 16:55:58 2022 +0000

    Filter unconfigured ports buffers queue/pg counters configurations on init.
    If no buffer configurations available, no counters will be created.
    Allow creating/removing counters on runtime if buffer PG/Queue is created or removed.
    New UT added to verify new flow.

    Signed-off-by: Shlomi Bitton <[email protected]>

Signed-off-by: Nazarii Hnydyn <[email protected]>
Signed-off-by: Nazarii Hnydyn <[email protected]>
@nazariig
Copy link
Collaborator Author

nazariig commented Aug 29, 2022

LGTM analysis: C/C++ is passed for a merge build:

Build merge (daae77f) - Succeeded
Build 202205 (7db9ddb) - Failed with bad exit code during 'Extraction'

[2022-08-29 17:07:54] [build-stderr] In file included from events.cpp:1:
[2022-08-29 17:07:54] [build-stderr] events_pi.h:10:10: fatal error: uuid/uuid.h: No such file or directory
[2022-08-29 17:07:54] [build-stderr]    10 | #include <uuid/uuid.h>
[2022-08-29 17:07:54] [build-stderr]       |          ^~~~~~~~~~~~~
[2022-08-29 17:07:54] [build-stderr] compilation terminated.
[2022-08-29 17:07:54] [build-stderr] make[3]: *** [Makefile:741: libswsscommon_la-events.lo] Error 1
[2022-08-29 17:07:54] [build-stderr] make[3]: *** Waiting for unfinished jobs....

@nazariig
Copy link
Collaborator Author

@prsunny can you please help to merge? This also contains a fix for LGTM

@nazariig
Copy link
Collaborator Author

nazariig commented Sep 2, 2022

@prsunny just a kind reminder

@liat-grozovik
Copy link
Collaborator

@prsunny i suggest we merged and with that merge we will fix the LGTM issues as well. Please approve.

@prsunny prsunny merged commit 2c5116e into sonic-net:202205 Sep 8, 2022
dgsudharsan added a commit to dgsudharsan/sonic-buildimage that referenced this pull request Sep 15, 2022
Update sonic-swss submodule pointer to include the following:
* f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451))
* 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437))
* 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432))

Signed-off-by: dgsudharsan <[email protected]>
dgsudharsan added a commit to dgsudharsan/sonic-buildimage that referenced this pull request Sep 16, 2022
Update sonic-swss submodule pointer to include the following:
* 04ce7be check state_db for po before sending ARP/ND pkts (sonic-net#2444) ([sonic-net#2450](sonic-net/sonic-swss#2450))
* f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451))
* 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437))
* 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432))

Signed-off-by: dgsudharsan <[email protected]>
vadymhlushko-mlnx added a commit to vadymhlushko-mlnx/sonic-swss that referenced this pull request Sep 20, 2022
…ured ports buffer queue/pg counters (sonic-net#2432)"

This reverts commit 2c5116e.

Because the community test test_iface_namingmode.py is not passing with this feature.
liat-grozovik pushed a commit that referenced this pull request Sep 21, 2022
…mprovement (#2462)

* Revert "[202205][counters] Improve performance by polling only configured ports buffer queue/pg counters (#2432)"

This reverts commit 2c5116e.

Because the community test test_iface_namingmode.py is not passing with this feature.
dgsudharsan added a commit to dgsudharsan/sonic-buildimage that referenced this pull request Sep 21, 2022
Update sonic-swss submodule pointer to include the following:
* 8eea92e [202205][counters] Revert PR sonic-net#2432 for the buffer queue/pg counters improvement ([sonic-net#2462](sonic-net/sonic-swss#2462))
* 5d8636a [202205] Enhance orchagent and buffer manager in error handling (sonic-net#2414) ([sonic-net#2449](sonic-net/sonic-swss#2449))
* aa22237 [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (sonic-net#2392) ([sonic-net#2455](sonic-net/sonic-swss#2455))
* 04ce7be check state_db for po before sending ARP/ND pkts (sonic-net#2444) ([sonic-net#2450](sonic-net/sonic-swss#2450))
* f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451))
* 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437))
* 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432))

Signed-off-by: dgsudharsan <[email protected]>
prsunny pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Sep 21, 2022
Update sonic-swss submodule pointer to include the following:
* 8eea92e [202205][counters] Revert PR #2432 for the buffer queue/pg counters improvement ([#2462](sonic-net/sonic-swss#2462))
* 5d8636a [202205] Enhance orchagent and buffer manager in error handling (#2414) ([#2449](sonic-net/sonic-swss#2449))
* aa22237 [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (#2392) ([#2455](sonic-net/sonic-swss#2455))
* 04ce7be check state_db for po before sending ARP/ND pkts (#2444) ([#2450](sonic-net/sonic-swss#2450))
* f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (#2431) ([#2451](sonic-net/sonic-swss#2451))
* 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([#2437](sonic-net/sonic-swss#2437))
* 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([#2432](sonic-net/sonic-swss#2432))
vadymhlushko-mlnx added a commit to vadymhlushko-mlnx/sonic-swss that referenced this pull request Sep 29, 2022
prsunny pushed a commit that referenced this pull request Oct 18, 2022
…ts buffer queue/pg counters (#2474)

* Revert "[202205][counters] Revert PR #2432 for the buffer queue/pg counters improvement (#2462)"
This reverts commit 8eea92e.
* [build] add missing package libyang-dev in lgtm.yml (#2475)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants