How to verify list of "isolated" and "nohz_full" CPU information from sysfs?

Solution Verified - Updated -

Environment

  • RHEL 7.2 and higher.
  • RHEL 8
  • kernel-3.10.0-327.el7.x86_64 and higher.

Issue

  • How to verify list of "isolated" and "nohz_full" CPU information from sysfs?

Resolution

  • From RHEL 7.2 onwards (kernel-3.10.0-327.el7.x86_64 and higher), the isolated CPUs and nohz_full CPU information can be verified from sysfs. The information is exported under following files.
/sys/devices/system/cpu/isolated
/sys/devices/system/cpu/nohz_full
  • If isolcpus is used with managed_irq or nohz flag, then make sure to use domain flag to Isolate from the general SMP balancing and scheduling algorithms. If isolcpus is used only with managed_irq or nohz flag and cpu-list, then /sys/devices/system/cpu/isolated file shows blank output.
# cat /proc/cmdline 
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.18.0-513.9.1.el8_9.x86_64 root=/dev/mapper/rhel_dhcp182--241-root ro crashkernel=auto resume=/dev/mapper/rhel_dhcp182--241-swap rd.lvm.lv=rhel_dhcp182-241/root rd.lvm.lv=rhel_dhcp182-241/swap isolcpus=nohz,2-7,10-15,18-23

# cat /sys/devices/system/cpu/isolated 
<null>

# cat /proc/cmdline 
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.18.0-513.9.1.el8_9.x86_64 root=/dev/mapper/rhel_dhcp182--241-root ro crashkernel=auto resume=/dev/mapper/rhel_dhcp182--241-swap rd.lvm.lv=rhel_dhcp182-241/root rd.lvm.lv=rhel_dhcp182-241/swap isolcpus=nohz,domain,2-7,10-15,18-23

# cat /sys/devices/system/cpu/isolated 
2-7,10-15,18-23

Root Cause

Diagnostic Steps

  • Verification of CPU isolation from sysfs.
# cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-3.10.0-320.el7.x86_64 root=/dev/mapper/rhel-root ro crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap console=ttyS1,115200n81 isolcpus=1,5-8 nohz_full=2,7-10
# cat /sys/devices/system/cpu/isolated 
1,5-8
# cat /sys/devices/system/cpu/nohz_full 
2,7-10

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments