Adjusting kernel scheduling parameters to better manage processes
The Linux kernel is a highly configurable piece of software, so there's a whole world of tunables that can be used for adjusting its behavior: for processes, for network cards, for disk, for memory, and more.
The most common tunables are the nice
process value and the I/O priority, which regulate respectively the prioritization versus other processes of the CPU and I/O time.
For interacting with processes we're about to start, we can use nice
or ionice
commands, prepending the command we want to execute with some parameters (remember to check the man
contents for each one to get the full available range of options). Just remember that for nice
, processes can go from –20 to +19, with 0 being the standard one, -20 the highest priority, and 19 the lowest priority (the higher the value, the nicer the process is).
Each process has a likelihood of getting kernel attention to run; by changing the priority...