最後更新: 2017-07-20
目錄
Find nice value (NI)
ps -axl
nice
# print the current niceness
nice
0
# adjustment
-n, --adjustment=N (default 10)
* Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable).
renice
# "19" - only run when nothing else on the system wants to
renice 19 -p pid
Other opts
-u, --user
systemd 修改 nice
# 查看
ps -axl | awk '{print $6 " " $13}' | grep httpd
# 修改
/usr/lib/systemd/system/httpd.service
[Service] # -20 (highest priority) ~ 19 (lowest priority) Nice=1
systemctl daemon-reload
service httpd restart