iotop does not show valid data in "SWAPIN" and "IO" columns.
This document (000020888) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Also an error message is seen:
"CONFIG_TASK_DELAY_ACCT not enabled in kernel, cannot determine SWAPIN and IO"
Total DISK READ : 0.00 B/s | Total DISK WRITE : 0.00 B/s Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND 1 be/4 root 0.00 B/s 0.00 B/s ?unavailable? systemd --switched-root --system --deserialize 30 2 be/4 root 0.00 B/s 0.00 B/s ?unavailable? [kthreadd] 3 be/0 root 0.00 B/s 0.00 B/s ?unavailable? [rcu_gp] 4 be/0 root 0.00 B/s 0.00 B/s ?unavailable? [rcu_par_gp] 6 be/0 root 0.00 B/s 0.00 B/s ?unavailable? [kworker/0:0H-events_highpri] 9 be/0 root 0.00 B/s 0.00 B/s ?unavailable? [mm_percpu_wq] 10 be/4 root 0.00 B/s 0.00 B/s ?unavailable? [rcu_tasks_kthre] <snip> 109 rt/4 root 0.00 B/s 0.00 B/s ?unavailable? [irq/39-pciehp] CONFIG_TASK_DELAY_ACCT not enabled in kernel, cannot determine SWAPIN and IO %
Resolution
1. Kernel command line change:
Add the "delayacct" kernel command line option.
Edit /etc/default/grub
change this line:
GRUB_CMDLINE_LINUX=""to:
GRUB_CMDLINE_LINUX="delayacct"Then run:
grub2-mkconfig -o /boot/grub2/grub.cfg
This will enable the option after the system is rebooted.
2. Enable the sysctl option:
A temporary fix:
echo 1 > /proc/sys/kernel/task_delayacctor
sysctl -w kernel.task_delayacct=1
Confirm the change is complete:
sysctl -n kernel.task_delayacct
To make the change permanent after the system is rebooted:
echo "kernel.task_delayacct = 1" >> /etc/sysctl.conf sysctl -p
Cause
The commit is e4042ad492357fa995921376462b04a025dd53b6
delayacct: Default disabled
Also commit 0cd7c741f01d added: ("delayacct: Add sysctl to enable at runtime").
Since Linux kernel 5.14, either kernel boot parameter 'delayacct' needs to
be specified or 'kernel.task_delayacct' sysctl needs to be enabled.
Additional Information
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15-SP4/index.html#boo-1200669
Latest iotop source (git://repo.or.cz/iotop.git) mentions in its man page:
"At least the CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING, CONFIG_TASKSTATS and CONFIG_VM_EVENT_COUNTERS options need to be enabled in your Linux kernel build configuration and since Linux kernel 5.14, the kernel.task_delayacct sysctl enabled."
https://github.com/Tomas-M/iotop/issues/26
https://repo.or.cz/iotop.git/commit/9c49d594a5ddea14dcb30f0f2b7dc67018767295
https://repo.or.cz/iotop.git/commit/dd4fcc71b1184264bed25fbc0ce7e2d758d8c396
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020888
- Creation Date: 13-Dec-2022
- Modified Date:06-Jan-2023
-
- SUSE Linux Enterprise Server
- SUSE Linux Enterprise Server for SAP Applications
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com