RFR: 8313083: Print 'rss' and 'cache' as part of the container information

Gerard Ziemski gziemski at openjdk.org
Tue Dec 19 21:22:53 UTC 2023


We add "rss" and "cache" metrics to cgroups v1 and v2

For cgroups v1, those metrics are named accordingly and are retrieved using the same names.

For cgroups v2, those metrics seem not to be directly provided, but instead we need:
- `"anon"` for "rss"
- `"file"` for "cache"

The cgroups v2 docs do not actually state this equivalence (https://docs.kernel.org/admin-guide/cgroup-v2.html), but instead this comes from reading cAdvisor src code - https://github.com/google/cadvisor/blob/2129e1c4fae8567551d1ac252c7a1dec27617e21/container/libcontainer/handler.go#L814C4-L814C4

-------------

Commit messages:
 - implement rss/cache for cgroups v1 and v2

Changes: https://git.openjdk.org/jdk/pull/17161/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17161&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8313083
  Stats: 43 lines in 8 files changed: 43 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/17161.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17161/head:pull/17161

PR: https://git.openjdk.org/jdk/pull/17161


More information about the hotspot-runtime-dev mailing list