Repeat ToStringSlice#1129
Merged
juanfont merged 1 commit intojuanfont:mainfrom Jan 11, 2023
QZAiXH:getFilteredByACLPeers
Merged
Repeat ToStringSlice#1129juanfont merged 1 commit intojuanfont:mainfrom QZAiXH:getFilteredByACLPeers
juanfont merged 1 commit intojuanfont:mainfrom
QZAiXH:getFilteredByACLPeers
Conversation
Owner
|
This will probably help in #1014. |
Contributor
Author
Yes, the 2-core CPU is now driving 550 machines. The cpu usage is currently a third of what it was before. |
This file contains hidden or 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
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.
…e cpu usage
I've been watching the cpu situation for the past few days, and I found that the cpu occasionally suddenly rises to 500%, so I used pprof to check and found that ToStringSlice causes the cpu to rise.
After optimizing it, the cpu is still rising occasionally, but not very much.
The final solution should be to use the cache to store the machine information for comparison, and modify the database data and cache information only when there are changes. I'm not familiar with it, so I haven't made the appropriate changes yet.
https://user-images.githubusercontent.com/23068780/210695313-54af7475-d527-4274-b33a-50838c44ed98.svg
https://user-images.githubusercontent.com/23068780/210695393-754f2a55-6894-42ac-8ecc-6294109e2f19.svg