-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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](memory) Fix compatibility with CgroupV2 #44579
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
c1b1509
to
8c25631
Compare
run buildall |
TPC-H: Total hot run time: 39760 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 197583 ms
|
ClickBench: Total hot run time: 33.05 s
|
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 40424 ms
|
TPC-DS: Total hot run time: 197065 ms
|
TeamCity be ut coverage result: |
ClickBench: Total hot run time: 33.39 s
|
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 39902 ms
|
TPC-DS: Total hot run time: 195542 ms
|
ClickBench: Total hot run time: 31.57 s
|
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
### What problem does this PR solve? Problem Summary: 1. Fix `memory.max` value is `max`. 2. Fix `memory_usage` minus `slab_reclaimable`, part of "slab" that might be reclaimed. Note, CgroupV2 MemAvailable is usually a little smaller than Process MemAvailable. Process `MemAvailable = MemFree - LowWaterMark + (PageCache - min(PageCache / 2, LowWaterMark))`, from `MemAvailable` in `/proc/meminfo`, calculated by OS. CgroupV2 `MemAvailable = cgroup_mem_limit - cgroup_mem_usage`, `cgroup_mem_usage = memory.current - inactive_file - slab_reclaimable`, in fact, there seems to be some memory that can be reused in `cgroup_mem_usage`. ref: https://arthurchiao.art/blog/cgroupv2-zh/
### What problem does this PR solve? Problem Summary: 1. Fix `memory.max` value is `max`. 2. Fix `memory_usage` minus `slab_reclaimable`, part of "slab" that might be reclaimed. Note, CgroupV2 MemAvailable is usually a little smaller than Process MemAvailable. Process `MemAvailable = MemFree - LowWaterMark + (PageCache - min(PageCache / 2, LowWaterMark))`, from `MemAvailable` in `/proc/meminfo`, calculated by OS. CgroupV2 `MemAvailable = cgroup_mem_limit - cgroup_mem_usage`, `cgroup_mem_usage = memory.current - inactive_file - slab_reclaimable`, in fact, there seems to be some memory that can be reused in `cgroup_mem_usage`. ref: https://arthurchiao.art/blog/cgroupv2-zh/
) Cherry-picked from #44579 Co-authored-by: Xinyi Zou <[email protected]>
) Cherry-picked from #44579 Co-authored-by: Xinyi Zou <[email protected]>
What problem does this PR solve?
Problem Summary:
memory.max
value ismax
.memory_usage
minusslab_reclaimable
, part of "slab" that might be reclaimed.Note, CgroupV2 MemAvailable is usually a little smaller than Process MemAvailable.
Process
MemAvailable = MemFree - LowWaterMark + (PageCache - min(PageCache / 2, LowWaterMark))
, fromMemAvailable
in/proc/meminfo
, calculated by OS.CgroupV2
MemAvailable = cgroup_mem_limit - cgroup_mem_usage
,cgroup_mem_usage = memory.current - inactive_file - slab_reclaimable
, in fact, there seems to be some memory that can be reused incgroup_mem_usage
.ref: https://arthurchiao.art/blog/cgroupv2-zh/
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)