RFR: 8356868: Not all cgroup parameters are made available [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Wed Jun 4 12:49:43 UTC 2025
On Wed, 4 Jun 2025 11:33:03 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:
>> Hi everyone,
>>
>> This PR improves cgroup support by exposing additional parameters that are currently not available. These parameters would enable more advanced features that rely on CPU and memory usage data.
>>
>> The new parameters are:
>>
>> - CPU usage: `cpuacct.usage` (cgroup v1) and `cpu.stat` (cgroup v2), which allow precise tracking of consumed CPU time.
>>
>> - Peak memory usage: `memory.peak` (cgroup v2). While the cgroup v1 equivalent (`memory.max_usage_in_bytes`) was already available, cgroup v2 previously returned `OSCONTAINER_ERROR` — this has now been fixed.
>>
>> - Memory throttle limit: `memory.high` (cgroup v2). There is no direct equivalent in cgroup v1, but since most systems use cgroup v2, exposing this parameter enables finer-grained memory control for those systems.
>>
>> Testing:
>> - All container tests under `/test/hotspot/jtreg/containers/`
>> - Manually inspected the new parameters in both cgroup v1 and v2 container environments with the relevant settings applied.
>
> Casper Norrbin has updated the pull request incrementally with one additional commit since the last revision:
>
> update cpu usage to use >=
>
> Co-authored-by: Severin Gehwolf <jerboaa at gmail.com>
Marked as reviewed by sgehwolf (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/25388#pullrequestreview-2896597343
More information about the hotspot-runtime-dev
mailing list