How to run a lag free Counter-Strike GameServer (CS 1.6)

Everything about Server-Configs, Plugins and AntiCheat-Systems.

How to run a lag free Counter-Strike GameServer (CS 1.6)

Postby predator on 16 Jan 2010, 18:38

Today i'd like to give you a short introduction on how to run
a lag free, highly optimized counter-strike gameserver on a windows platform.


Why windows? Well there are various tutorials out there for linux and windows platforms,
but especially the windows server tutorials are really crap and most of you won't
or can't deal with a linux operating system.

Anyways, let's start.

1) HLDS-Update-Tool
2) MetaMod
3) AmxModX
4) HL Booster
5) Timer Resolution
6) Process Tamer
7) Optimizing the Gameserver
8) Optimize Windows for Gameservers
9) The Secret
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

1) HLDS-Update-Tool

Postby predator on 16 Jan 2010, 18:42

First you need to download the latest hlds (half life dedicated server) update tool from steam.
It is available for linux and windows platforms here: http://store.steampowered.com/about/

Direct Links:
Windows HLDS-Update-Tool
Linux HLDS-Update-Tool

Run the tool and follow the introduction on the setup.

Now you should be able to run your cs 1.6 server the first time. If you are behind a firewall or router
you need to open/forward the gameserver port (default: 27015), else nobody can connect to your server
over the internet.
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

2) MetaMod

Postby predator on 16 Jan 2010, 18:51

If you like to customize your cs 1.6 gameserver and to run some plugins you need to install MetaMod.
MetaMod exists in 2 versions, the original and an optimized version. You should get the optimized one for sure.

Original MetaMod Version:
http://metamod.org/

Optimized MetaMod-P Version:
http://metamod-p.sourceforge.net/

Carefully read the install introductions on the website!

To check that you installed MetaMod correctly type "meta list" to the server console.
You also can do this within the game console but you need to login with your rcon password first:

"rcon_password yourpassword"
"rcon meta list"

The rcon password can be changed on the server.cfg in your cstrike server directory.

Note: It's not allowed to run MetaMod on ESL Servers.
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

3) AmxModX

Postby predator on 16 Jan 2010, 19:19

AmxModX is an Addon for MetaMod and allows you to run various great plugins and mods
on your counter-strike server.
Note: Running alot of Plugins dramaticly decrease the server performance!

AmxModx Website
http://www.amxmodx.org/

Plugins and Mods for AmxModx
http://forums.alliedmods.net/forumdisplay.php?f=3

It is highly recommend to carefully read the installation and administration manuals:
http://wiki.amxmodx.org/Category:Docume ... X_Mod_X%29

Beleave me you'll spent a lot of time with them before you are satisfied with your server.
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

4) HL Booster

Postby predator on 16 Jan 2010, 19:34

HL Booster is a small MetaMod Plugin for windows servers that optimize your server rates at runtime.
The goal of this plugin is to get stable fps, lower pings and a better server performance.

HL Booster 2.40
http://www.fpsbanana.com/tools/328

Check the "booster_readme.txt" for the install introductions.

.
Attachments
HLBooster 2.4.zip
(23.6 KiB) Downloaded 783 times
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

5) Timer Resolution

Postby predator on 16 Jan 2010, 19:44

The internal windows timer is optimized for desktop applications and not for gameservers.
This timer controls the time a thread gains to do it's work. By the default this intervall is to long
and you won't get more then 100 fps without lowering it.

TimerResolution
http://www.lucashale.com/timerresolution/

Note: HLBooster contains a similar solution so you probably don't need this tool.

.
Attachments
TimerResolution.zip
(6.5 KiB) Downloaded 443 times
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

6) Process Tamer

Postby predator on 16 Jan 2010, 19:53

Process Tamer is a small tool that allows you to force the process priority of your cs 1.6 server (hlds.exe)
and to manage all other processes that maybe consume alot of resources.


Process Tamer Website
http://www.donationcoder.com/Software/M ... index.html

It is recommend to force the process priority of your hlds.exe to "high" - stay away from "realtime"!
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

7) Optimizing the Gameserver

Postby predator on 16 Jan 2010, 20:06

Now you are ready to optimize your game server.

Locate the server.cfg in your server cstrike directory, make a backup and open the original one.
Well most settings effect the gameplay itself and allow or restrict various stuff and i'm not going to explain them.

mp_autokick "0"
mp_autoteambalance "0"
mp_buytime "0.50"
mp_c4timer "35"
mp_chattime "5"
mp_consistency "1"
mp_decals "300"
mp_fadetoblack "0"
mp_flashlight "1"
mp_footsteps "1"
mp_forcecamera "0"
mp_forcechasecam "0"
mp_freezetime "5"
mp_friendlyfire "0"
//mp_hostagepenalty "3"
mp_kickpercent "1"
mp_limitteams "0"
mp_logdetail "3"
mp_logecho "0"
mp_logfile "1"
mp_logmessages "1"
mp_mapvoteratio "1"
mp_maxrounds "0"
mp_roundtime "2.0"
mp_startmoney "16000"
mp_timelimit "30"
mp_tkpunish "0"
mp_winlimit "0"

allow_spectators "1"
decalfrequency "60"
edgefriction "2"
host_framerate "0"
log off
pausable "0"

sv_accelerate "5"
sv_aim "0"
sv_airaccelerate "10"
sv_airmove "1"
sv_allowdownload "1"
sv_allowupload "1"
sv_alltalk "0"
sv_cheats "0"
sv_clienttrace "1"
sv_friction "4"
sv_gravity "800"

// forcing the client and server rates
sv_maxrate "25000"
sv_minrate "13000"
sv_maxupdaterate "100"
sv_minupdaterate "67"
sv_maxcmdrate "100"
sv_mincmdrate "67"

sv_maxspeed "320"
sv_proxies "1"
sv_send_logos "0"
sv_send_resources "1"
sv_stepsize "18"
// sv_timeout "65"
sv_timeout "18" // lower value prevents some sv_bad kicks
sv_voiceenable "0"
sv_wateraccelerate "10"
sv_wateramp "0"
sv_waterfriction "1"

sv_unlag "1"
sv_unlagsamples "1"
sv_unlagpush "0"
sv_maxunlag "0.35"

//sys_ticrate "1990" // managed by hl booster
hpk_maxsize "0.6"
host_framerate "0"

max_queries_sec -1
max_queries_sec_global -1
max_queries_window -1

hostname "Your Server Name"
// specifiy a fast download url where you place all custom models and maps
sv_downloadurl "http://domain.tld/gamefiles/cstrike/"
// remote server password - you should change this !
rcon_password "yourpassword"

map de_dust2 // default map

// load ban files
exec listip.cfg
exec banned.cfg

exec booster.cfg // hl booster config file


You should keep an eye on the following settings:
// forcing the client and server rates
sv_maxrate "25000"
sv_minrate "13000"
sv_maxupdaterate "100"
sv_minupdaterate "67"
sv_maxcmdrate "100"
sv_mincmdrate "67"

//sys_ticrate "1990" // managed by hl booster

// specifiy a fast download url where you place all custom models and maps
sv_downloadurl "http://domain.tld/gamefiles/cstrike/"

// remote server password - you should change this !
rcon_password "yourpassword"
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

8) Optimize Windows for Gameservers

Postby predator on 16 Jan 2010, 20:24

How to optimize windows for gameservers? Good question - You still did!
There is no need to change anything and it makes no sense to edit your registry,
create ram disks or to lower your visual settings if you run your game server
on a modern windows operating system with a medium or high end hardware!

These changes won't have an effect and you just risk an unstable/damaged system.
The point is, you don't have the same possibilities to modify the system core like on a linux system
and finally modern windows (server) systems are well optimized by default.
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

9) The Secret

Postby predator on 16 Jan 2010, 21:08

If you followed all my introductions you reached the end of all other tutorials
you can find on the internet. There is nothing more to do and you should got
a stable and lag free cs server. Well - that's not true, maybe you noticed
some improvements on your performance but you don't got the true lan/eps feeling, right?


There are some secrets i'd like to share with you.

Let's start with error handling. A common problem on counter-strike 1.6 servers are the sv_bad errors
that kick most of the connected players from your server.
This happens almost on 32 slot servers
that running alot of plugins. There are some solutions that help to reduce the problem.

1) Edit the server.cfg and set: sv_timeout "18"
2) Download and install the attached amxmodx plugins: sv_bad.zip



Now let's proceed with forcing the client rates. Well that's not the nice way,
but most players are using configs with low rates or don't allow the server
to change the rates within the range the server allows. This is a hugh problem
which effects the gameplay badly.


But note: Forcing the rates is the worst solution and some of your players will notice
a bad side effect like lags because there connection or pc is not able to handle it.

Anyways, it helps to prevent client based config cheats too.

3) Download and install the attached amxmodx plugin: rates.zip


Last but not least the ultimate tweak to optimize your gameserver for the real lan feeling.
For all who did not fall in sleep while reading this i'd like to present the best tweak at all.
It is a small plugin that turns off various calculations server side with a great performance boost!


The plugin reduces chokes and you'll notice that much more bullets reach their targets.
It also reduces the bandwidth the server sends.

Sounds to good? It's the truth, BUT there is a negative side effect, some animations are badly timed
especially that dead bodys don't fall to the ground for about 2 seconds. The only working solution i found
is to remove dead bodys instantly. Not the best one but worth to have it.

4) Download and install the attached amxmodx plugins: serverboost.zip

.
Attachments
serverboost.zip
(6.32 KiB) Downloaded 1009 times
rates.zip
(23.93 KiB) Downloaded 903 times
sv_bad.zip
(10.97 KiB) Downloaded 713 times
Image
User avatar
predator
 
Posts: 3334
Joined: 01 Jul 2008, 09:50

Next

Return to Gameserver Administration



Who is online

Users browsing this forum: No registered users and 4 guests

cron
1