SUSE Support

Here When You Need Us

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

SUSE Linux Enterprise Server 15 SP4

Situation

The SWAPIN and IO colums only show "?unavailable?".

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

There are two options to resolve this issue. Either a kernel command line change that will require a reboot to be effective, or a sysctl edit that can be done while the system is running.


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_delayacct
or 
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

This is because an upstream kernel commit changed the behavior
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

This was mention in the SLES15-SP4 release notes:
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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.