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

[flex-counters] [202012] Delay flex counters stats init for faster boot time #1804

Merged
merged 3 commits into from
Jul 1, 2021
Merged

[flex-counters] [202012] Delay flex counters stats init for faster boot time #1804

merged 3 commits into from
Jul 1, 2021

Conversation

shlomibitton
Copy link
Contributor

Signed-off-by: Shlomi Bitton shlomibi@nvidia.com

What I did
Update flex counters DB with counters stats only when counters are enabled.
As long as the polling counters are not enabled, flex counters information will stored internally on PortsOrch.

Why I did it
Creating flex counters objects on the DB will trigger 'SYNCD' to access the HW for query statistics capabilities.
This HW access takes time and will be better to finish boot before doing this (mainly for fast-reboot but good to have in general).
The flex counters are not crucial at boot time, we can delay it to the end of the boot process.

How I verified it
Reboot a switch and observer the flex counters DB populated after counters are enabled.

Details if related

Add flex counters unit-test

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
@yxieca yxieca merged commit b0fb392 into sonic-net:202012 Jul 1, 2021
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jul 5, 2021
[flex-counters] [202012] Delay flex counters stats init for faster boot time (sonic-net/sonic-swss#1804)
Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
@shlomibitton shlomibitton deleted the delay_flex_counters_202012 branch July 27, 2021 16:32
qiluo-msft pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Aug 16, 2021
…hange (#3903)

### Approach
#### What is the motivation for this PR?
Following PR's:
sonic-net/sonic-swss#1803
sonic-net/sonic-swss#1804
Flex counters are delayed and these tests are failing as a result of missing information on the DUT.
This PR is to wait until all counters are enabled before running the test.
Timeout value chosen by the delay script which can be found here:
https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-orchagent/enable_counters.py

#### How did you do it?
Wait until all counters are enabled before running the tests.

#### How did you verify/test it?
Run the tests with this change.
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…hange (sonic-net#3903)

### Approach
#### What is the motivation for this PR?
Following PR's:
sonic-net/sonic-swss#1803
sonic-net/sonic-swss#1804
Flex counters are delayed and these tests are failing as a result of missing information on the DUT.
This PR is to wait until all counters are enabled before running the test.
Timeout value chosen by the delay script which can be found here:
https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-orchagent/enable_counters.py

#### How did you do it?
Wait until all counters are enabled before running the tests.

#### How did you verify/test it?
Run the tests with this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants