Per-device IO pressure and stats

PSI io stall plus per-major:minor rbytes/wbytes/rios; pin noisy disk neighbors

cat /sys/fs/cgroup/system.slice/<name>.service/io.pressure /sys/fs/cgroup/system.slice/<name>.service/io.stat

tool
cgroups8 commands
tags
cgroupsdiskperformanceobservability

More cgroups commands

  • cat /sys/fs/cgroup/system.slice/<name>.service/cgroup.procs; systemctl status <name>.service | grep CGroup

    Every PID currently in the service slice; cross-check with systemctl status tree

  • systemd-cgls --all --no-pager; systemd-cgtop -d 2 --depth=3

    cgls --all shows empty cgroups too; cgtop ranks slices by live CPU/mem/io

  • cgcreate -g memory:/<name>; cgset -r memory.limit_in_bytes=512M <name>; cgexec -g memory:/<name> <command>

    libcgroup v1 throwaway limit. note: v2 unified hierarchy uses systemd-run --scope -p

  • cat /sys/fs/cgroup/system.slice/<name>.service/memory.current /sys/fs/cgroup/system.slice/<name>.service/memory.max

    Live RSS vs hard limit for a systemd service; current near max = imminent OOM

  • cat /sys/fs/cgroup/system.slice/<name>.service/memory.pressure

    PSI: time tasks stalled on memory reclaim; rising avg10 = thrashing before OOM

all 8 cgroups commands