This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
feat: tcmalloc memory release improvements #435
Merged
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 is this pull request solved
In pull request #343 , we optimize tcmalloc release memory. Based on the former implementation, this pull request add more improvements about it:
New perf-counter
replica*eon.replica_stub*tcmalloc.release.memory.size
This perf-counter has a problem that it will only be updated every interval time. For example, if tcmalloc memory release time interval is one hour, one server releases 1G memory at 10:00, the value won't change until 11:00. As a result, the monitor graph will be like a trapezoid.
If you have a better way to solve this problem, please comment this pull request or discuss with me offline.
New remote command
command help:
replica.release-tcmalloc-memory <true|false>
Usage sample: