sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

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

Open vadymhlushko-mlnx opened this issue 3 years ago • 9 comments

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

vadymhlushko-mlnx avatar Sep 29 '22 07:09 vadymhlushko-mlnx

/azpw run

vadymhlushko-mlnx avatar Oct 10 '22 13:10 vadymhlushko-mlnx

/AzurePipelines run

mssonicbld avatar Oct 10 '22 13:10 mssonicbld

/azpw run

vadymhlushko-mlnx avatar Oct 10 '22 13:10 vadymhlushko-mlnx

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 10 '22 13:10 azure-pipelines[bot]

/AzurePipelines run

mssonicbld avatar Oct 10 '22 13:10 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 10 '22 13:10 azure-pipelines[bot]

/azpw run

vadymhlushko-mlnx avatar Oct 11 '22 08:10 vadymhlushko-mlnx

/AzurePipelines run

mssonicbld avatar Oct 11 '22 08:10 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 11 '22 08:10 azure-pipelines[bot]

/azpw run

vadymhlushko-mlnx avatar Oct 24 '22 08:10 vadymhlushko-mlnx

/AzurePipelines run

mssonicbld avatar Oct 24 '22 08:10 mssonicbld

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

azure-pipelines[bot] avatar Oct 24 '22 08:10 azure-pipelines[bot]

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

vadymhlushko-mlnx avatar Oct 25 '22 10:10 vadymhlushko-mlnx