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

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

Conversation

vadymhlushko-mlnx
Copy link
Contributor

@vadymhlushko-mlnx vadymhlushko-mlnx commented Sep 29, 2022

This reverts commit f0f1eb47c4ae5359666a026f8b6d4b4d2d1838aa
Signed-off-by: Vadym Hlushko vadymh@nvidia.com

commit 6f1199afc3458e526c26b5d7c498fdaf810fbaca
Author: Shlomi Bitton <shlomibi@nvidia.com>
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 <shlomibi@nvidia.com>

Propagating sonic-swss/pull/2143 with resolved merge conflicts

Depends on:

sonic-utilities/pull/2239
sonic-utilities/pull/2408
sonic-mgmt/pull/6431

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 changes 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 are created in Counters DB according to the configurations.
Add/Remove buffer PG/Queue configurations and observe the corresponding counters created/removed accordingly.
New UT was added to verify this flow.

Details if related

@vadymhlushko-mlnx
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@vadymhlushko-mlnx
Copy link
Contributor Author

/azpw run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vadymhlushko-mlnx vadymhlushko-mlnx force-pushed the master-buffer-queue-pg-counters branch from b7990cd to a0af6aa Compare October 10, 2022 13:20
@vadymhlushko-mlnx
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vadymhlushko-mlnx vadymhlushko-mlnx force-pushed the master-buffer-queue-pg-counters branch from a0af6aa to 916cd74 Compare October 11, 2022 08:28
@vadymhlushko-mlnx vadymhlushko-mlnx force-pushed the master-buffer-queue-pg-counters branch from 916cd74 to b59fd4f Compare October 21, 2022 13:49
@vadymhlushko-mlnx
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s).

@vadymhlushko-mlnx vadymhlushko-mlnx force-pushed the master-buffer-queue-pg-counters branch from b59fd4f to 80d7953 Compare October 24, 2022 09:07
@vadymhlushko-mlnx
Copy link
Contributor Author

@liat-grozovik could you please approve?
@prsunny could you please merge?

@liat-grozovik liat-grozovik merged commit dbdf31c into sonic-net:master Oct 25, 2022
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Nov 10, 2022
Advance sonic-swss submodule to pick up new commits:

dbdf31c [counters] Improve performance by polling only configured ports buffer queue/pg counters sonic-net/sonic-swss#2473
ab4f804 [portsorch] remove port OID from saiOidToAlias map on port deletion sonic-net/sonic-swss#2483
ab29920 [QoS] Support dynamic headroom calculation for Barefoot platforms sonic-net/sonic-swss#2412
15beee4 Add support for voq counters in portsorch. sonic-net/sonic-swss#2467
c8d4905 [vlanmgr] Disable arp_evict_nocarrier for vlan host intf sonic-net/sonic-swss#2469
31c9321 [chassis][voq]Collect counters for fabric links sonic-net/sonic-swss#1944

Signed-off-by: Kebo Liu <kebol@nvidia.com>
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.

3 participants