Help [Ubuntu] How to Start HLDS with higher priority?

WhiteFang

Пользователь
Регистрация
9 Июн 2017
Сообщения
38
Симпатии
0
Пол
Мужской
Hello Guys!
I've been using Ubuntu 16.04 LTS for my HLDS server for the past 2 years. The server wasn't famous so with the amount of plugins it ran fine but now it's famous lot of people come so the fps were quite unstable so I upgraded the machine from the VPS hosting and saw that the same thing happened. So I followed a few guides and compiled a kernel with some custom settings, changing the process's priority and it's scheduling policy I saw that the server ran quite stable but the server starts by a startup script and I don't have time to change the process's priority and scheduling policy everytime. Is there anyway that I can make it start at a higher priority + the scheduling policy?

The commands I've been using are:
The Schedule policy cmd:
Код:
chrt -p -r 99 pid
Renice:
Код:
renice -20 pid
I've heard of the task set command anyway to do it?
Startup line:
Код:
cd /home/steam/Steam/cs/&&screen -A -m -d -S server ./hlds_run -game cstrike -ip xx.xx.xx.xx +port 27015 +map de_dust2 +maxplayers 32 -exec server.cfg -pingboost 2 +fps_max 1100 -condebug
Note: I have added this startup line at /etc/rc.local , so the process is ran by root.

 

WhiteFang

Пользователь
Регистрация
9 Июн 2017
Сообщения
38
Симпатии
0
Пол
Мужской
Lock the topic please, I found the solution.
What I did was make an executable named server and added this line:
Код:
chrt -r 99 nice -n -20 ./hlds_run -game cstrike -ip xx.xx.xx.xx +port 27015 +map de_dust2 +maxplayers 32 -exec server.cfg -pingboost 2 +fps_max 1100 -condebug
And just the changed the startup line in /etc/rc.local to:
Код:
cd /home/steam/Steam/cs/&& screen -A -m -d -S server ./server
 
Сверху Снизу