Integrated: 8356868: Not all cgroup parameters are made available
Casper Norrbin
cnorrbin at openjdk.org
Wed Jun 25 08:35:35 UTC 2025
On Thu, 22 May 2025 09:06:15 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.
This pull request has now been integrated.
Changeset: 850bc203
Author: Casper Norrbin <cnorrbin at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/850bc20306e5101d164566f9a8687707492b296b
Stats: 163 lines in 10 files changed: 148 ins; 0 del; 15 mod
8356868: Not all cgroup parameters are made available
Reviewed-by: sgehwolf, gziemski
-------------
PR: https://git.openjdk.org/jdk/pull/25388
More information about the hotspot-runtime-dev
mailing list