With recent kernels, iotop will display "CONFIG_TASK_DELAY_ACCT not enabled in kernel, cannot determine SWAPIN and IO" and indeed columns 'swapin' and 'io' will be empty. It's a known problem, but upstream kinda... doesn't care: https://www.spinics.net/lists/kernel/msg4054591.html I create this ticket to gather information on the problem. The kernel link has a workaround. I'm not aware of any 'easy' solution (patch) for gentoo.
The information in https://superuser.com/questions/610581/iotop-complains-config-task-delay-acct-not-enabled-in-kernel-only-for-specific seems relevant, if not tremendously useful.
*** Bug 833617 has been marked as a duplicate of this bug. ***
Fedora pulls this revision: https://repo.or.cz/iotop.git/commit/4e4fbca5618ba264bf502c2dad0ecb9cb458cd7a In the least we could add an ewarn/einfo like #833617 was doing, but it's probably better to just bump to the latest revision. Though it's probably better to do this: sysctl kernel.task_delayacct=1 or add kernel.task_delayacct=1 to /etc/sysctl.conf Instead of advising passing the kernel commandline.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4a2e1576fa423a575a475dc2e24c37bdc75e6e3 commit d4a2e1576fa423a575a475dc2e24c37bdc75e6e3 Author: Joe Kappus <joe@wt.gd> AuthorDate: 2023-01-24 10:23:43 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-02-04 22:49:44 +0000 sys-process/iotop: add 0.6_p20230124 This bump fixes a lot of lingering issues as well as removing the need for patching. Moved to EAPI8 and PEP517. Closes: https://github.com/gentoo/gentoo/pull/24258 Closes: https://bugs.gentoo.org/815151 Co-authored-by: Sam James <sam@cmpct.info> Co-authored-by: Hairu/budgetazoo? Signed-off-by: Joe Kappus <joe@wt.gd> Closes: https://github.com/gentoo/gentoo/pull/29240 Signed-off-by: Sam James <sam@gentoo.org> sys-process/iotop/Manifest | 1 + sys-process/iotop/iotop-0.6_p20230124.ebuild | 32 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+)
I accepted ~amd64 on one system for the iotop package to get the 0.6_p20230124 version mentionned in the patch. It still displays this at the bottom: "CONFIG_TASK_DELAY_ACCT and kernel.task_delayacct sysctl not enabled in kernel, cannot determine SWAPIN and IO %" The "swapin" and "io" columns are not displayed anymore (instead of displaying errors on each line previously). Is that the expected behaviour ? That's independant of sysctl kernel.task_delayacct=0/1, on a very recent kernel (6.1.9)
Some of it is expected behavior. However, the columns shouldn't be missing unless your terminal window is not wide enough. iotop doesn't support toggling kernel.task_delayacct itself. iotop-c does and is the more active project, I generally recommend it where it's applicable to run it. The past 10 years, iotop's upstream has just been housekeeping and occasional patches, not active development, so that's why it seems like the minimal amount of effort for warning messages was done. My motivation for updating to later snapshot is so users have better documentation and Gentoo doesn't have to keep a bunch of patches in the tree. iotop-c currently blocks iotop because they both have the same executable name, but it's my plan to submit a PR to rename iotop to iotop-c as other distros have done so users have the option of installing both at the same time. Also, after turning on kernel.task_delayacct with sysctl, your system needs like 30 seconds or so of data collection, just leave iotop up and the warning should go away, values should show up.
I didn't know about iotop-c. I'm happy to unmerge iotop and merge it instead. Both blocking each other is not a big deal, there's no real use case of having both. Thanks for all this valuable information.