Adjust the process priority level

Source: Internet
Author: User


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

    1. 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

    1. Renice-5-p 5200
    2. 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:

      1. Top
      2. #进入top后按"R" –> input process pid–> Enter nice value

Adjust the process priority level

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.