[SERVER-60412] Host memory limit check does not honor cgroups v2 Created: 04/Oct/21 Updated: 29/Oct/23 Resolved: 18/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.2.6 |
| Fix Version/s: | 4.4.14, 5.3.0, 5.0.7, 4.2.20 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ayhan APAYDIN | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | containers, docker, linux, not-fcv, servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v5.0, v4.4, v4.2
|
||||||||||||||||||||||||
| Sprint: | Service Arch 2022-1-24 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||
| Story Points: | 2 | ||||||||||||||||||||||||
| Description |
|
As I checked mongoDB gained support for memory constraints over cgroup in linux with Current code to read memory limits in src/mongo/util/processinfo_linux.cpp
But in cgroups v2 the memory limit is at /sys/fs/cgroup/memory.max. I think engine should check if the cgroups v2 is enabled on the host and then read the limits according to that. Tested on mongodb 4.2.6 in docker containers at host Fedore CoreOS 34.20210904.3.0. But I do believe newer versions have the same since source code seems same since first implementation.
|
| Comments |
| Comment by Githook User [ 07/Mar/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 6bc31230f0cd0de66f02268c5ce0920c4f27effe) |
| Comment by Githook User [ 07/Mar/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 6bc31230f0cd0de66f02268c5ce0920c4f27effe) |
| Comment by Githook User [ 07/Mar/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 6bc31230f0cd0de66f02268c5ce0920c4f27effe) |
| Comment by Githook User [ 18/Jan/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |
| Comment by Lauren Lewis (Inactive) [ 12/Jan/22 ] |
|
thanks kevin.arhelger for the follow-up. Spoke w/shameek.ray & we are adding this to our Top Priority Tickets list & will get to it as soon as we can. |
| Comment by James H [ 07/Jan/22 ] |
|
Does this issue apply to mongodb 4.4 as well? |
| Comment by Lauren Lewis (Inactive) [ 16/Nov/21 ] |
|
Flagging for Scheduling, was on the product groomed ticket backlog 2nd in prioritized list. |
| Comment by Ratika Gandhi [ 25/Oct/21 ] |
|
We should investigate other cgroups v2 changes we will have to make along with doing this ticket. |
| Comment by Edwin Zhou [ 14/Oct/21 ] |
|
Thanks for your bug report. I'll pass this on to the appropriate team for further investigation in a potential improvement. Best, |