Skip to content

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

Merged
yxieca merged 2 commits intosonic-net:202012from
shlomibitton:shlomi_delay_counters_202012
May 4, 2021
Merged

[flex-counters] Delay flex counters stats init for faster boot time [202012]#1736
yxieca merged 2 commits intosonic-net:202012from
shlomibitton:shlomi_delay_counters_202012

Conversation

@shlomibitton
Copy link
Copy Markdown
Contributor

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

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

Shlomi Bitton added 2 commits May 2, 2021 10:30
Signed-off-by: Shlomi Bitton <[email protected]>

Fix PortsOrch unit-test with new code.
Fix 'test_pg_drop' to adapt new change

Signed-off-by: Shlomi Bitton <[email protected]>
@yxieca yxieca merged commit 03774db into sonic-net:202012 May 4, 2021
qiluo-msft added a commit that referenced this pull request May 12, 2021
liat-grozovik pushed a commit that referenced this pull request May 13, 2021
@shlomibitton shlomibitton deleted the shlomi_delay_counters_202012 branch July 27, 2021 16:32
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
1) Set default loglevel to SYSLOG_ERR
2) Make log level configurable via args
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.

2 participants