-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
http_status: add the http api for ballast object #26579
Conversation
Signed-off-by: Sen Han <00hnes@gmail.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
It seems the CI environment is not using go 1.16 |
/rebuild |
1 similar comment
/rebuild |
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.
What if the heap size reaches the two times of the ballast size? Can the GC affect performance a lot?
A better error description when the input ballast-object-sz from the POST body is negative. Co-authored-by: Lei Zhao <zlwgx1023@gmail.com>
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 05e6ac5
|
Basically, Golang's GC has two phases: mark and sweep. C1: Sweep is a very fast operation, and the time cost of GC is largely dominated by the mark phase, not the sweep. C2: The time cost of the mark phase in GC is mainly depending on the amount of the living objects and has very little to do with the amount of unused objects. So above all, when the heap size reaches the two times of the ballast size:
|
What problem does this PR solve?
Try to reduce the GC frequency on some occasions.
What is changed and how it works?
Add a ballast object.
Here are some articles and documentation.
SetGCPercent
Go memory ballast: How I learnt to stop worrying and love the heap
proposal: runtime: add a mechanism for specifying a minimum target heap size
Check List
Tests
Side effects
Documentation
Release note