View priority levels
PS-E-O Class,rtprio,pri,nice,cmd
Manually adjust the priority level
100-139:nice
Nice N COMMAND program starts with this priority
Renice-n PID sets priority on already running programs
1-99:
Chrt-f-P PID adjustment of FF
Chrt-r-P POD adjustment for RR
Chrt can also adjust 100-139 of the not-F can be
-----------------------------------------------------------------------------------------
Second, the command to modify the priority of the process has two main: Nice,renice
1. Start executing the program to specify a nice value: Nice
- Nice-n-5/usr/local/mysql/bin/mysqld_safe &
Linux Nice command details
Function Description: Set priority.
Syntax: Nice [-n < priority level >][--help][--version][execution Instructions]
Additional note: The Nice directive can change the priority level of program execution.
Parameter:-n< priority level > or-< priority level > or –adjustment=< priority > Set priority level for the instruction to be executed. Levels range from 20-19, where-20 is the highest, 19 lowest, and only system administrators can set negative levels.
Help online Help.
–version Displays version information.
—————————————————————————
2.1, adjust the existing process Nice:renice
- Renice-5-p 5200
- the process of #PID为 5200 nice set to-5
Linux Renice Command detailed
Function Description: Adjust priority.
Syntax: Renice [Priority Level][-G < program group name ...] [-p < Program identification Code, ....] [-u < user name; ...]
Additional note: The Renice directive can readjust the priority level of the program execution. The preset is to adjust its priority with the program identification Code designation program, you can also specify the program group or user name to adjust the priority level, and modify all the programs that belong to the program group or user priority. Level range from -20–19, only system administrators can change the priority of other user programs, and only system administrators can set negative levels.
Parameters
-G < program group name > Use the program group name to modify the priority of all programs that belong to the program group.
-P < Program identification code > change the program's priority level, this parameter is a preset value.
-u < user name > Specify user name, modify the priority of all programs that belong to the user.
2.2. You can also change the existing process's nice with the top command:
- Top
- #进入top后按"R" –> input process pid–> Enter nice value
Adjust the process priority level