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

http: add /debug/gogc to set GOGC on the fly #20247

Merged
merged 5 commits into from
Sep 27, 2020
Merged

Conversation

bobotu
Copy link
Contributor

@bobotu bobotu commented Sep 27, 2020

What problem does this PR solve?

Problem Summary:
Sometimes we need to adjust the GOGC to temporarily relieve memory pressure, so I have added an HTTP API to support this operation.

图片

What is changed and how it works?

What's Changed:
Use debug.SetGCPercent to adjust GOGC for the next GC cycle, and update TiDB-Runtime dashboard to use the real GOGC value.

To make it easier to troubleshooting, I also added GOGC and MAXPROCS to the output of /info.

Release note

  • No release note.

@pingcap pingcap deleted a comment from sre-bot Sep 27, 2020
@bobotu
Copy link
Contributor Author

bobotu commented Sep 27, 2020

/run-monitor-test

@sre-bot
Copy link
Contributor

sre-bot commented Sep 27, 2020

Visit the grafana server at: http://172.16.5.5:32445, it will last for 5 hours

@bobotu bobotu requested a review from jackysp September 27, 2020 07:56
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 27, 2020
@lysu
Copy link
Contributor

lysu commented Sep 27, 2020

/approve

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Sep 27, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Sep 27, 2020
@lysu
Copy link
Contributor

lysu commented Sep 27, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 27, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 4b98dba into pingcap:master Sep 27, 2020
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Sep 27, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #20253

@bobotu bobotu deleted the gogc branch September 27, 2020 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/server status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants