Setting Process CPU Priority With nice and renice Linux Commands

1118

Nice is a command in Unix and Linux operating systems that allows for the adjustment of the “Niceness” value of processes. Adjusting the “niceness” value of processes allows for setting an advised CPU priority that the kernel’s scheduler will use to determine which processes get more or less CPU time. In Linux this niceness value can be ignored by the scheduler, however other Unix implementations can treat this differently.

Being able to adjust the niceness value comes in handy in two scenarios usually.

The first is when you have a process that is or may cause resource contention; for this scenario we would increase the processes niceness value.

The second is when you want to increase the resources of a specific process in order to decrease the run time or give a process higher priority. For this scenario we would decrease the processes niceness value.

 

 

Read more at bc-log