Scheduling Mode Optimization
Purpose
Adjust the OS scheduling policy to improve the CPU usage and overall server performance.
Procedure
- Modify the kernel startup parameters.
- Open the file.
1sudo vi /etc/default/grub
- Press i to enter the insert mode and add the following content:
sched_steal_node_limit=4 kpti=off mitigation=off
The following figure shows the modification result:

- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Make the modification take effect.
1sudo grub2-mkconfig -o /boot/efi/EFI/openEuler/grub.cfg
- Open the file.
- Reboot the server for the new GRUB configuration to take effect.
1reboot
- Enable the stealtask function.
- Write STEAL to the /sys/kernel/debug/sched_features file to enable the stealtask function.
1echo STEAL > /sys/kernel/debug/sched_features
- Check the /proc/cmdline file and ensure that the added startup parameters have taken effect.
cat /proc/cmdline
The expected result is that /proc/cmdline contains the content added in 1.b.

- Check the content of the /sys/kernel/debug/sched_features file.
cat /sys/kernel/debug/sched_features
The STEAL state of the file indicates that the stealtask function has been enabled.

- Write STEAL to the /sys/kernel/debug/sched_features file to enable the stealtask function.
Parent topic: OS Tuning