-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[fix](memtracker) Fix thread mem tracker try consume accuracy #12782
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
xinyiZzz
force-pushed
the
20220920_fix_memtracker
branch
from
September 20, 2022 11:03
3100a59
to
4e00909
Compare
dataroaring
approved these changes
Sep 20, 2022
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.
LGTM
github-actions
bot
added
the
approved
Indicates a PR has been approved by one committer.
label
Sep 20, 2022
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
xinyiZzz
added a commit
to xinyiZzz/incubator-doris
that referenced
this pull request
Sep 22, 2022
13 tasks
xinyiZzz
added a commit
that referenced
this pull request
Sep 22, 2022
* [fix][memtracker] remove gc and fix print * [fix](memory) Fix BE OOM when load -238 fail * [fix](memtracker) Process physical mem check does not include tc/jemalloc allocator cache (#12688) tcmalloc/jemalloc allocator cache does not participate in the mem check as part of the process physical memory. because new/malloc will trigger mem hook when using tcmalloc/jemalloc allocator cache, but it may not actually alloc physical memory, which is not expected in mem hook fail. in addition: The value of tcmalloc/jemalloc allocator cache is used as a mem tracker, the parent is the process mem tracker, which is updated every 1s. Modify the process default mem_limit to 90%. expect mem tracker to effectively limit the memory usage of the process. * Fix memory leak by calling in mem hook (#12708) After the consume mem tracker exceeds the mem limit in the mem hook, the boost stacktrace will be printed. A query/load will only be printed once, and the process tracker will only be printed once per second. After the process memory reaches the upper limit, the boost stacktrace will be printed every second. The observed phenomena are as follows: After query/load is canceled, the memory increases instantly; tcmalloc profile total physical memory is less than perf process memory; The process mem tracker is smaller than the perf process memory; * [fix](memtracker) Fix thread mem tracker try consume accuracy #12782 * [Bugfix](mem) Fix memory limit check may overflow (#12776) This bug is because the result of subtracting signed and unsigned numbers may overflow if it is negative. Co-authored-by: Zhengguo Yang <yangzhgg@gmail.com>
FreeOnePlus
pushed a commit
to FreeOnePlus/doris
that referenced
this pull request
Oct 8, 2022
FreeOnePlus
pushed a commit
to FreeOnePlus/doris
that referenced
this pull request
Oct 8, 2022
FreeOnePlus
pushed a commit
to FreeOnePlus/doris
that referenced
this pull request
Oct 8, 2022
FreeOnePlus
pushed a commit
to FreeOnePlus/doris
that referenced
this pull request
Oct 8, 2022
FreeOnePlus
pushed a commit
to FreeOnePlus/doris
that referenced
this pull request
Oct 8, 2022
FreeOnePlus
pushed a commit
to FreeOnePlus/doris
that referenced
this pull request
Oct 8, 2022
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-1.1
approved
Indicates a PR has been approved by one committer.
area/memory-consumption
dev/merged-1.1.3-deprecated
reviewed
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.
Proposed changes
Issue Number: close #xxx
Problem summary
When the thread mem tracker try consume fails, an error msg will be generated, and the error msg will be returned after forcibly consume.
Temporary memory requests during the generation of error msg will be tracked by errors, causing the final value of the process mem tracker to become larger.
fix:
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...