# rhel9
grubby --update-kernel=ALL --args="selinux=0 net.ifnames=0 biosdevname=0 crashkernel=256M intel_idle.max_cstate=0 processor.max_cstate=1 idle=poll nohz_full=2-35 rcu_nocbs=2-35 isolcpus=managed_irq,domain,2-35 irqaffinity=0-1 ipv6.disable=1 pci=nommconf pcie_aspm=off" # core isolation
cat /sys/devices/system/cpu/isolated # Fetch isolated core and check if the core has been isolated.
[user@machine ~]$ cat /proc/cmdline
BOOT_IMAGE=(mduuid/35e9369058f9a7598978718b5569aac6)/vmlinuz-5.14.0-362.8.1.el9_3.x86_64 root=/dev/mapper/vg0-root ro resume=/dev/mapper/vg0-swap rd.md.uuid=cb4beb04:bff85a77:a55d65d8:9e672ffc rd.lvm.lv=vg0/root rd.md.uuid=35e93690:58f9a759:8978718b:5569aac6 rd.lvm.lv=vg0/swap net.ifnames=0 biosdevname=0 crashkernel=256M intel_idle.max_cstate=0 processor.max_cstate=1 idle=poll nohz_full=1-7 rcu_nocbs=1-7 isolcpus=1-7 console=tty1 ipv6.disable=1 pci=nommconf pcie_aspm=off
# isolcpus
remove the cores from SMP balancing then can pin to a specific process.
# nohz_full
Specify which CPU cores can enter a completely tick free state under the premise of kernel 'CONFIG-NOHZ_SULL=y'.
The nohz_full parameter will handle the timer loop of the specified CPU list in different ways. If the CPU is designated as nohz_full CPU and there is only one runnable task on the CPU, the kernel will stop sending the timer daemon to that CPU. Therefore, running the application may take more time, while service interruption and context switching may take less time.
If you have a 100Hz tick, then 100 times per second, the operating system will wake up, check if any timers have expired, and if so, execute their actions before entering sleep mode again. On a tick less system, the operating system will check when the next timer expires and then sleep until that time, instead of waking up 100 times per second to see if there is anything that can be processed.
When there is only one task running on the CPU, not sending scheduling clock interrupts to this CPU reduces scheduling clock interrupts and does not interrupt idle CPUs, thereby reducing power consumption and system jitter.
# rcu_nocbs
RCU (Read copy Update) is a high-performance locking mechanism that allows readers to access shared data protected by RCU without obtaining a lock (fast speed) in situations where there is more read and less write. But for write operations, it first copies a copy, then modifies the copy, and finally uses a callback mechanism to point the original data pointer to the modified data at the appropriate time, so the write speed is very slow.
Rcu_nocbs=cpulist specifies that certain CPUs are callback free. When callback mechanism is needed, transfer the work to other CPUs to alleviate the load on the Nocb CPU.
Add Comment