Niceness
Some time-shared threads are more important than others. You can indicate this with the nice value, which multiplies a thread's CPU entitlement by a scaling factor. The name comes from the function call, nice(2), which has been part of Unix since the early days. A thread becomes nice by reducing its load on the system, or moves in the opposite direction by increasing it. The range of values is from 19, which is really nice, to -20, which is really not nice. The default value is 0, which is averagely nice, or so-so.
The nice value can be changed for SCHED_NORMAL and SCHED_BATCH threads. To reduce niceness, which increases the CPU load, you need the CAP_SYS_NICE capability, which is available to the root user.
Almost all the documentation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access