Fix cpu count with cgroup limits#33342
Conversation
|
Tested by creating a simple docker image: |
By the way, this can be tested using integration test, something similar to https://github.com/ClickHouse/ClickHouse/blob/master/tests/integration/test_jemalloc_percpu_arena/test.py |
I'll try to add some tests later this week |
|
How does this work with cgroupv2 only hierarchies? |
After doing some research, this PR doesn't work under cgroup v2. Reference: |
|
I think it's ok to just add v1 and have a separate issue for v2. |
|
"Stress test (debug, actions) — OOM killer (or signal 9) in clickhouse-server.log" I'm not sure why this test is failed. |
|
@Mergifyio update |
✅ Branch has been successfully updated |
|
@Mergifyio update |
❌ Base branch update has failedDetailsmerge conflict between base and head |
Signed-off-by: JaySon-Huang <[email protected]>
Signed-off-by: JaySon-Huang <[email protected]>
Signed-off-by: JaySon-Huang <[email protected]>
bc20c24 to
d71a31b
Compare
|
I think this PR is ready to be reviewed. Is there anything I need to do? |
|
I am waiting for CI and going to merge it 👍 |
|
Is any plans to backport this to 21.8? |
|
@thyn No, as it is not a bugfix. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Respect cgroup limits for CPU quota
Detailed description / Documentation draft:
close #2261, close #25662
Try to check cgroup limits under
/sys/fs/cgroup/cpu/. Reference: http://hg.openjdk.java.net/jdk/jdk/rev/7f22774a5f42