-
Notifications
You must be signed in to change notification settings - Fork 525
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 counter] Flex counter threads consume too much CPU resources #2031
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. water thread flex counter will consume many cpu resouces on some platforms. change the default interval for those counters from 10 seconds to 60 seconds to workaround this issue. The performance issue of flex counter read need to be addressed separately, this is just a workaround. if it needs smaller granulatiry, the interval could be adjusted through CLI under SONIC shell. counterpoll
neethajohn
reviewed
Nov 15, 2021
prsunny
approved these changes
Nov 16, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required to be backported?
neethajohn
approved these changes
Nov 16, 2021
Yes, this one should be back ported to 201911 and 202012. |
5 tasks
@StormLiangMS , for future PRs, please create a fork of this repo and raise PR from there |
StormLiangMS
changed the title
[flex counter] Flex counter threads consume too much CPU resources #9202
[flex counter] Flex counter threads consume too much CPU resources
Nov 23, 2021
qiluo-msft
pushed a commit
that referenced
this pull request
Nov 23, 2021
…202 (#2031) * [flex counter] Flex counter threads consume too much CPU resources #9202 1. water thread flex counter will consume many cpu resouces on some platforms. change the default interval for those counters from 10 seconds to 60 seconds to workaround this issue. The performance issue of flex counter read need to be addressed separately, this is just a workaround. if it needs smaller granulatiry, the interval could be adjusted through CLI under SONIC shell. counterpoll * Increase the buffer pool watermark interval from 10 seconds to 60 seconds
neethajohn
added a commit
to sonic-net/sonic-utilities
that referenced
this pull request
Feb 28, 2022
… counters (#2082) Signed-off-by: Neetha John <nejo@microsoft.com> sonic-net/sonic-swss#2031 updated the flex counter polling interval to 60s for watermark counters but the show command wasn't updated to reflect the correct default value What I did Display the correct poll interval for watermark related counters in the 'counterpoll show' command How I did it Update the default interval to be the same as the one updated by the Orchs How to verify it Issue "counterpoll show", the queue, pg and buffer pool watermark should show default 60s Updated the counterpoll unit tests to reflect the same
judyjoseph
pushed a commit
to sonic-net/sonic-utilities
that referenced
this pull request
Mar 7, 2022
… counters (#2082) Signed-off-by: Neetha John <nejo@microsoft.com> sonic-net/sonic-swss#2031 updated the flex counter polling interval to 60s for watermark counters but the show command wasn't updated to reflect the correct default value What I did Display the correct poll interval for watermark related counters in the 'counterpoll show' command How I did it Update the default interval to be the same as the one updated by the Orchs How to verify it Issue "counterpoll show", the queue, pg and buffer pool watermark should show default 60s Updated the counterpoll unit tests to reflect the same
malletvapid23
added a commit
to malletvapid23/Sonic-Utility
that referenced
this pull request
Aug 3, 2023
… counters (#2082) Signed-off-by: Neetha John <nejo@microsoft.com> sonic-net/sonic-swss#2031 updated the flex counter polling interval to 60s for watermark counters but the show command wasn't updated to reflect the correct default value What I did Display the correct poll interval for watermark related counters in the 'counterpoll show' command How I did it Update the default interval to be the same as the one updated by the Orchs How to verify it Issue "counterpoll show", the queue, pg and buffer pool watermark should show default 60s Updated the counterpoll unit tests to reflect the same
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Watermark flex counter will consume many CPU resources on some platforms.
By increasing the default interval for those counters from 10 seconds to 60 seconds to
workaround this issue. The performance issue of flex counter need to be addressed
separately, this is just to reduce CPU consumption by adjusting the granularity of watermark related counters .
If smaller granularity is needed, the interval could be adjusted through CLI under SONIC shell as below.
counterpoll watermark interval <interval_val_in_ms>
Fixes sonic-net/sonic-buildimage#9202
Why I did it
How I verified it
Details if related