sonic-swss
sonic-swss copied to clipboard
[counters] Improve performance by polling only configured ports buffer queue/pg counters
This reverts commit f0f1eb47c4ae5359666a026f8b6d4b4d2d1838aa Signed-off-by: Vadym Hlushko [email protected]
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]>
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
/azpw run
/AzurePipelines run
/azpw run
Azure Pipelines successfully started running 1 pipeline(s).
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s).
/azpw run
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s).
/azpw run
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s).
@liat-grozovik could you please approve? @prsunny could you please merge?