|If you own or rent a Dedicated Server mainly to run one server on it, this tutorial will surely be interesting for you. We will explain you how you can tell the box that srcds has priority numero uno.
For Windows, we will alter the "restart" script that is mentioned at the Windows installation tutorial. This one is very easy. We will change the "start line" to this:
|start /high /wait srcds.exe -console -game cstrike +map de_dust -maxplayers 16|
The /high is the addition. You can also use /abovenormal, which is a bit less than high. What we did is telling our box that it has to be focussed on srcds. According to some users at Counter-Server, a very popular HLDS resource this can also increase the performance of hlds/srcds under Windows. This is not confirmed though.
To "renice" srcds under Linux we need to write the process id to a pid file. This is the number that is assigned to the srcds process. We will add this to the command line:
|./srcds_run ... -pidfile srcds.pid|
When you closed srcds and added this to the command line, please log in as root. Now we will use a tool that tells the system to ensure the process is at the highest priority every 5 minutes. (Otherwise as soon srcds crashes the priority would go back to normal)
Type crontab -e
|*/5 * * * * renice -20 `cat /home/yoursrcdspath/srcds.pid` >/dev/null 2>&1|
Now press CTRL-X
Replace /home/yoursrcdspath/ in the example with the path of your srcds server. (Without the moddir)
This should make your server alot smoother, even at large maps. The price is however, this is the application that gets the best performance and other applications might suffer. Good luck!