...
- core isolation
Generally cpu is always automatically schedling scheduling process to cores to keep load balance, however, if you prefer to allocate CPU resources manually, can do an isolation.Code Block # 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 # 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.
- HT (hyper-threading)
Code Block grubby --args=nosmt --update-kernel=DEFAULT # disable SMT grubby --update-kernel=ALL --remove-args="nosmt" # enable SMT lscpu | grep -e Socket -e Core -e Thread # check HT status