<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On 6 Dec 2022, at 06:45, Vladimir Mokrozub <mogaba2009@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>Thank you, I added
<code>"systemd.unified_cgroup_hierarchy=1</code> " to the kernel's command line and systemd-cgtop now shows Input/Output.</div><div>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.</div><div>Is it safe to switch to v2 mode?<br></div></div></div></blockquote><div><br></div>Better question is this; Is it safe to stay on the legacy V1 with its missing features and no new development?</div><div><br></div><div>At some point you will have to fix the issues if you depend on legacy v1 cgroups.</div><div>The v1 support is being dropped from systemd at some point I think.</div><div><br></div><div>Barry</div><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 5, 2022 at 4:16 PM Michal Koutný <<a href="mailto:mkoutny@suse.com">mkoutny@suse.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello.<br>
<br>
On Mon, Dec 05, 2022 at 09:38:18AM +0300, Vladimir Mokrozub <<a href="mailto:mogaba2009@gmail.com" target="_blank">mogaba2009@gmail.com</a>> wrote:<br>
> $ systemctl --version<br>
> systemd 245 (245.4-4ubuntu3.19)<br>
> +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP<br>
> +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN<br>
> +PCRE2 default-hierarchy=hybrid<br>
^^^^^^<br>
Unless you override this on kernel cmdline, it means (blk)io controller<br>
is in v1 mode.<br>
<br>
> systemd-cgtop always has "-" in both Input/s and Output/s columns. There<br>
> are no spikes, even under a high disk load.<br>
> I was testing it with "dd if=/dev/sda of=/dev/null". Here's the output:<br>
> <br>
> Control Group Tasks %CPU Memory Input/s Output/s<br>
> / 214 101.5 3.7G - -<br>
> user.slice 15 99.6 2.9G - -<br>
> system.slice 97 0.4 95.4M - -<br>
<br>
1) It won't have proper hierarchical behavior (thus no values for .slice<br>
units, cgtop defaults to depth of 3 thus you may not see the active<br>
leaves),<br>
2) it won't charge writeback IO properly (just FYI, it's not relevant<br>
to your example).<br>
<br>
If you can, I'd suggest you to switch to the unified mode if you want<br>
hierarchical IO accounting.<br>
<br>
HTH,<br>
Michal<br>
</blockquote></div>
</div></blockquote></div><br></body></html>