Thank you, I added
"systemd.unified_cgroup_hierarchy=1
" to the kernel's command line and systemd-cgtop now shows Input/Output.However, I ran into a problem with LXC containers after switching to unified mode and though I managed to solve it, I'm worried that something else might break in the future.
Is it safe to switch to v2 mode?
On Mon, Dec 5, 2022 at 4:16 PM Michal Koutný <mkoutny@xxxxxxxx> wrote:
Hello.
On Mon, Dec 05, 2022 at 09:38:18AM +0300, Vladimir Mokrozub <mogaba2009@xxxxxxxxx> wrote:
> $ systemctl --version
> systemd 245 (245.4-4ubuntu3.19)
> +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
> +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN
> +PCRE2 default-hierarchy=hybrid
^^^^^^
Unless you override this on kernel cmdline, it means (blk)io controller
is in v1 mode.
> systemd-cgtop always has "-" in both Input/s and Output/s columns. There
> are no spikes, even under a high disk load.
> I was testing it with "dd if=/dev/sda of=/dev/null". Here's the output:
>
> Control Group Tasks %CPU Memory Input/s Output/s
> / 214 101.5 3.7G - -
> user.slice 15 99.6 2.9G - -
> system.slice 97 0.4 95.4M - -
1) It won't have proper hierarchical behavior (thus no values for .slice
units, cgtop defaults to depth of 3 thus you may not see the active
leaves),
2) it won't charge writeback IO properly (just FYI, it's not relevant
to your example).
If you can, I'd suggest you to switch to the unified mode if you want
hierarchical IO accounting.
HTH,
Michal