In linux, adjusting the priority of a process determines whether the process is preferentially processed by resources allocated by the cpu. When the cpu resources are sufficient, every running process can be allocated enough resources for processing. At this time, adjusting the priority of the process makes no sense. If the cpu resources are insufficient, top view when the cpu usage reaches 90% or above, the process with a higher priority will be preferentially allocated resources for execution. If you have a very important task to execute at this time, such as transmitting a very important data or preparing to send a very urgent email to the customer, you want these tasks to be completed first, you need to adjust the priority of these tasks. Priority = priority coefficient + nice priority coefficient is determined by the system kernel. You can manually change the nice value if you cannot change it. The value range is-20 ~ 19 The lower the priority value, the higher the priority. The higher the priority value, the lower the priority. So if you want to adjust it to the highest priority, set nice to-20. If you want to adjust it to the lowest priority, set nice to 19. Adjust Priority: 1. Adjust the task before it is run # nice-N-20 sh/xxx. sh -- run xxx with the highest priority. sh script # nice-n19 sh/xxx. sh -- run xxx with the lowest priority. sh Script 2. When the task has started running, adjust ① # top -- view the current running status of the system process> r -- type A small r> PID to renice: -- prompt to enter the pid of the running process> Renice PID 23302 to value: -- set the nice value of the process, adjust ② # renice-20 PID as needed change the nice value of the process to-20 # renice 19 PID change the nice value of the process to 19