CPU scheduling parameters
In this topic, let's discuss a few CPU scheduling parameters, which will fine tune the scheduling policy.
Getting ready
In the previous recipe, we discussed memory-related parameters, which are not sufficient for better performance. Much like memory, kernel also supports various CPU-related tuning parameters, which will drive the processes scheduling.
How to do it...
Let us discuss about, few major CPU kernel scheduling parameters in Linux:
kernel.sched_autogroup_enabled
This parameter groups all the processes that belong to the same kernel session ID, which are further processed as a single process scheduling entity rather than multiple entities. That is, the CPU will indirectly spend a contiguous amount of time on a group of processes that belong to the same session rather than switching to multiple processes. Using the ps xa -o
, sid
, pid
, and comm
command, where we can get the session ID of the processes. It is always recommended to set this value to 0...