This tutorial is to how to reduce your lagging a bit and reduce loss and choke etc..
Client side settings
Important Client CVARS
cl_cmdrate
cl_updaterate
cl_rate
cl_lc
ex_interp
cl_cmdrate is the number of game packets per second, you the client will try to send to the server. Again this should not be set higher than your frames per second and not any lower than 20.
cl_updaterate is the number of game packets per second the client will attempt to request off the server. This should be no higher than 100 or the maximum number of frames per second you are getting, and should be no lower than 20.
cl_rate is exactly the same as rate, except that it is the number that determines how much bandwidth the client can send to the server in bytes per second.3
cl_lc is for lag compensation set it to 1 for good gameplay.
ex_interp calculates all possible player positions that said player could be. Now, you control how much your client interpolates by using ex_interp.
So basically: The higher the interp setting, the more cs "guesses" where the other player is. That's why a long time ago, you could set ex_interp very high and see a player before they were actually there.
.01 - Very little "guessing"
.1 - Somewhat more "guessing" if you use this it decreases the disappear and appear effect of players. But guessing might not be always correct.
rate bytes/sec limit FROM the server, Sets how much data/information you receive from the server that you are connected to - for a 14.4 connection, set your rate to 1500 - 33.6k connection use 3000 - 56k modem use 3500 - ISDN should be 5000 - all connections faster than that should be between 5000 and 9999.
IMPORTANT
Press tilde"~" to get the console. Type "netgraph 3" in the console to see choke and loss data. Type "rate" to see the current rate. Type "rate=10000" to set the rate. All without quotes.
Definitions:
Choke: server too slow - you need to ask for less data or find better server.
When you are alone on the map and not doing anything, then the server only needs to send about 1000 bytes a second. When you are in a firefight, the server can end up wanting to send 10,000 bytes a second.
So if you set your rate above the sv_maxrate you can expect choke when things get busy and you are asking for more data than the server will let you have. There is no point having a rate above sv_maxrate.
Loss: you too slow - you need a better computer, or send less data, or have lower fps_max and graphics settings. May vary map to map.
Packet: A discrete piece of data for network transmission. Size of packet varies depending on how much is going on. Thus the need for an upper limit for bytes/sec (rate and cl_rate).
Ping: Time in milliseconds for your connection to reach the server. Broadband might be 40 to 100, dial up around 200, LAN 0 to 40. Busy servers with overloaded connections will make ping worse (higher).
Errors
cl_FlushEntityPacket - This error can be caused by having your cl_cmdrate and cl_updaterate set too high for the current rate. Your ping will go crazy and CS will hardly update at all causing weird problems. Try lowering the cl_updaterate and cl_cmdrate to 50, or 40. You might also try increasing the rate if you have a fast enough connection (as you increase the rate watch your loss, once your rate is too high you will get loss - lower the rate till you get no loss). With a frame rate of 60 and cl_cmdrate of 40 is still very playable. Down to 30 and you will start to notice a delay between you instruction and the result, ie when buying weapons for instance. The optimal cl_cmdrate and cl_updaterate would match the frame rate (what you set fps_max and fps_modem too).
choke - You'll probably experience some choke when things get busy, small amounts for a small time under 10 is ok. If it is consistently going too high and effecting play, or it is present when there is nothing much happening then your cl_cmdrate and cl_updaterate are too high. Experiment and bring them down by 5, see how you like it and see how the choke goes. You'll notice your ping goes down as you lower the cl_updaterate and cl_cmdrate because you are taking the load off your connection, which is not necessarily a good thing if you don't get updated quickly enough!
To Improving choke and decrease the loss
1. Change your rate setting to be similar or equal to what the servers is, if possible. This enables you to have as much bandwidth as the server can provide.
2. Lower your cl_updaterate so you are requesting less game packets per second. Try reducing it to 20 and then keep increasing till you start to get choke, now decrease a bit and leave it.
IMPORTANT
If you do this for every server and save it in a cfg file ex: for server kkkkSTRIKE after finding out the optimum configs to reduce loss and choke save the settings in kkkkSTRIKE.cfg and place it in cstrike folder so that when ever you join the server you don't have to type all the cvars for kkkkSTRIKE you just execute kkkkSTRIKE.cfg . Go to console and type "exec kkkkSTRIKE.cfg" without quotes. You can do this for servers in which you play regularly and as soon as you join a particular server you just execute that servers cfg file.
Sunday, February 1, 2009
How to unlag yourself from a laggy server [ Client side settings ]
Labels:
choke,
client settings,
lag compensation,
loss,
ping,
rates
How to make a lag free server
This tutorial is to make your server lag free
Server Side Settings
IMPORTANT
If your server doesn't lag don't use this method, if you want u may.
If your server lags you can use this method.
I can't guarantee that your server will stop lagging 100% but it will lessen for sure.
Things you need to know before getting started
Every server is unique.
Server settings are different in different server.
It depends on your server settings and your internet speed and even your computer capability.
Three things to tweak
1. Operating system configuration.
2. Internet configuration in OS.
3. Server settings.
Operating system tweaks
1. While you run the server no other processes should be running, close all unnecessary applications (tasks) using task manager especially messenger, browsers and music players even your antivirus. You can even close explorer.exe to bring it back got to taskmanager (alt+ctrl+del) and select file->new task(run)-> type explorer.exe -> ok.
2. Open windows media player and don't play any music this will make the use of high resolution timers don't open any other music player.
3. Reduce the visual effects, right click my computer->properties->advanced->performance settings->visual effects->custom->unmark all and select only, fade or slide tooltips, show shadows under menu, use common tasks in folders, use drop shadows for icon, use visual styles in windows.
4. Got to advanced in performance settings and in virtual memory change-> select a drive which have more than 1gb free hdd space and type initial size 1024 maximum size 1200 click on set then apply -> ok.
5. Right click my computer select properties-> system restore-> click on turn off system restore. apply-> ok .
6. You have to stop some unwanted services or you can disable them go to control panel->Administrative Tools->services->select the service and select stop which is to left of screen or right click select stop.
The services that have to be stopped are, I have just stopped it and made it manual you can even disable it.


Internet Tweak
Download this tcp optimizer
http://www.speedguide.net/files/TCPOptimizer.exe
before you use it read how to use it.
Important: Back up current settings and then do as the procedure in the site says.
This will tweak internet speed and optimize it.
Or you can use auslogic boostspeed.
Defragment your hard drive this is also an important factor.
Server settings tweak
This is only for a dedicated server not listen server. To know how to create a dedicated server read the PREVIOUS POSTS.
If you run a dedicated server its better if you run it in console mode cause it speeds up the loading of a game by not loading up the background 3D graphics on the main menu and instead loading up a blurry background picture and the command console is open.
To start a server in console mode, make a shortcut of hlds.exe then right click the shortcut file select properties->shortcut and paste this line in the target window after hlds.exe.
-console -game cstrike +port 27016 +hostname "Counter strike 1.6" +map de_minidust2 +maxplayers 10


server.cfg this is the most important one
It has cvars = console variables also called as commands .
There are many cvars of those the very important ones that depends on your server performance are
sv_maxrate
sv_minrate
sv_maxupdaterate
sv_minupdaterate
sys_ticrate
rate
sv_unlag
tickrate
Configuring these settings
sv_maxrate is the highest number of bytes per second that the server will transfer to each player.
sv_minrate is the smallest number.
sv_maxupdaterate which is the max number of packets per second sent to clients.
sv_minupdaterate is the smallest number.
To calculate settings for your particular server go to this url.
http://www.reece-eu.net/drekrates.php
Here you can find out optimum rates for your server depending on your comp specification and internet speed. I tested it and it worked out well.
Here it almost always specifies sv_minrate to be set to "0".
But if you want to allow dialup players, If yes, set it to 4000 or 5000, and set the sv_minupdaterate to 15 or 20.
If bandwidth is no limit, I would set the maxrate to 15000 and the maxupdaterate to 60.
sys_tickrate
Here's the big CVAR that impacts gameplay more than anything else. Sys_ticrate is a measure of how fast commands execute on the server and it DIRECTLY VARIES with the server's fps rating. The more FPS the server handles, the better the registry and gameplay. The HL Engine is limited to 1000fps max. To achieve high-ticrates your system must be using a high-resolution timer. (can be achieved by idling something like windows media player) For match servers and private servers your ticrate should be at the very least 500 (about 250 fps).
Rule of thumb for sys_ticrate:
sys_ticrate 500 = 250fps
sys_ticrate 1000 = 512 fps
sys_ticrate 10000 = 1000fps (Max)
High ticrate servers eat processing power, but they are worth it.
rate : bytes/sec limit FROM the server, Sets how much data/information you receive from the server that you are connected to - for a 14.4 connection, set your rate to 1500 - 33.6k connection use 3000 - 56k modem use 3500 - ISDN should be 5000 - all connections faster than that should be between 5000 and 9999.
sv_unlag and cl_lc are for lag compensation
but sv_unlag is for server and cl_lc is for client set it to 1 for good gameplay.
Tickrate
The tickrate of a game server is a measure of how often a server will update the game world. For example, a server running with a tickrate of 33 will update the world 33 times a second. This may seem like a lot, but in precision games such as Counter Strike Source a higher tickrate is essential. The downside of tickrate however is that more bandwidth and CPU is consumed by the server, if you want a smooth server though a higher tickrate is essential. Tickrate can be anything from 33 to 100, however the most common values are:
* 33 Tick
* 66 Tick
* 100 Tick
Most Source games run at 33 or 66 tick by default. Counter Strike Source for example runs at a default of 33 tick.
to apply a tick rate u have to run the dedicate server in console mode and add the command -console -tickrate 33 -hostname "kkkkSTRIKE"
Command Line Commands
There are some commands which can only be used in the Target box of your HL2 icon, or in the 'Set Launch Options' box of Steam. They cannot be used in the game's console or in your autoexec.cfg file. These are referred to as 'Command Line' commands, and the most useful of these commands are provided below
-heapsize [Kilobytes]: This command tells the Source Engine to allocate more RAM to the system heap, where it can be accessed by the game to improve performance by caching more game information in RAM and hence reducing loading pauses. The default heapsize varies, but can be 256MB or less. If you have 2GB of RAM you may wish to increase this to 512MB (a heapsize of 524288). You can use higher values if you wish, but I don't recommend exceeding half your physical RAM (e.g. for 2GB RAM, don't set heapsize higher than 1024000). You can't force the game to load completely into RAM, that's not what this command does.
-console: Speeds up the loading of a game by not loading up the background 3D graphics on the main menu and instead loading up a blurry background picture and the command console is open. Note you can close this console using the '~' key or clicking the x at the top right of the box.
Server Side Settings
IMPORTANT
If your server doesn't lag don't use this method, if you want u may.
If your server lags you can use this method.
I can't guarantee that your server will stop lagging 100% but it will lessen for sure.
Things you need to know before getting started
Every server is unique.
Server settings are different in different server.
It depends on your server settings and your internet speed and even your computer capability.
Three things to tweak
1. Operating system configuration.
2. Internet configuration in OS.
3. Server settings.
Operating system tweaks
1. While you run the server no other processes should be running, close all unnecessary applications (tasks) using task manager especially messenger, browsers and music players even your antivirus. You can even close explorer.exe to bring it back got to taskmanager (alt+ctrl+del) and select file->new task(run)-> type explorer.exe -> ok.
2. Open windows media player and don't play any music this will make the use of high resolution timers don't open any other music player.
3. Reduce the visual effects, right click my computer->properties->advanced->performance settings->visual effects->custom->unmark all and select only, fade or slide tooltips, show shadows under menu, use common tasks in folders, use drop shadows for icon, use visual styles in windows.
4. Got to advanced in performance settings and in virtual memory change-> select a drive which have more than 1gb free hdd space and type initial size 1024 maximum size 1200 click on set then apply -> ok.
5. Right click my computer select properties-> system restore-> click on turn off system restore. apply-> ok .
6. You have to stop some unwanted services or you can disable them go to control panel->Administrative Tools->services->select the service and select stop which is to left of screen or right click select stop.
The services that have to be stopped are, I have just stopped it and made it manual you can even disable it.
Internet Tweak
Download this tcp optimizer
http://www.speedguide.net/files/TCPOptimizer.exe
before you use it read how to use it.
Important: Back up current settings and then do as the procedure in the site says.
This will tweak internet speed and optimize it.
Or you can use auslogic boostspeed.
Defragment your hard drive this is also an important factor.
Server settings tweak
This is only for a dedicated server not listen server. To know how to create a dedicated server read the PREVIOUS POSTS.
If you run a dedicated server its better if you run it in console mode cause it speeds up the loading of a game by not loading up the background 3D graphics on the main menu and instead loading up a blurry background picture and the command console is open.
To start a server in console mode, make a shortcut of hlds.exe then right click the shortcut file select properties->shortcut and paste this line in the target window after hlds.exe.
-console -game cstrike +port 27016 +hostname "Counter strike 1.6" +map de_minidust2 +maxplayers 10


server.cfg this is the most important one
It has cvars = console variables also called as commands .
There are many cvars of those the very important ones that depends on your server performance are
sv_maxrate
sv_minrate
sv_maxupdaterate
sv_minupdaterate
sys_ticrate
rate
sv_unlag
tickrate
Configuring these settings
sv_maxrate is the highest number of bytes per second that the server will transfer to each player.
sv_minrate is the smallest number.
sv_maxupdaterate which is the max number of packets per second sent to clients.
sv_minupdaterate is the smallest number.
To calculate settings for your particular server go to this url.
http://www.reece-eu.net/drekrates.php
Here you can find out optimum rates for your server depending on your comp specification and internet speed. I tested it and it worked out well.
Here it almost always specifies sv_minrate to be set to "0".
But if you want to allow dialup players, If yes, set it to 4000 or 5000, and set the sv_minupdaterate to 15 or 20.
If bandwidth is no limit, I would set the maxrate to 15000 and the maxupdaterate to 60.
sys_tickrate
Here's the big CVAR that impacts gameplay more than anything else. Sys_ticrate is a measure of how fast commands execute on the server and it DIRECTLY VARIES with the server's fps rating. The more FPS the server handles, the better the registry and gameplay. The HL Engine is limited to 1000fps max. To achieve high-ticrates your system must be using a high-resolution timer. (can be achieved by idling something like windows media player) For match servers and private servers your ticrate should be at the very least 500 (about 250 fps).
Rule of thumb for sys_ticrate:
sys_ticrate 500 = 250fps
sys_ticrate 1000 = 512 fps
sys_ticrate 10000 = 1000fps (Max)
High ticrate servers eat processing power, but they are worth it.
rate : bytes/sec limit FROM the server, Sets how much data/information you receive from the server that you are connected to - for a 14.4 connection, set your rate to 1500 - 33.6k connection use 3000 - 56k modem use 3500 - ISDN should be 5000 - all connections faster than that should be between 5000 and 9999.
sv_unlag and cl_lc are for lag compensation
but sv_unlag is for server and cl_lc is for client set it to 1 for good gameplay.
Tickrate
The tickrate of a game server is a measure of how often a server will update the game world. For example, a server running with a tickrate of 33 will update the world 33 times a second. This may seem like a lot, but in precision games such as Counter Strike Source a higher tickrate is essential. The downside of tickrate however is that more bandwidth and CPU is consumed by the server, if you want a smooth server though a higher tickrate is essential. Tickrate can be anything from 33 to 100, however the most common values are:
* 33 Tick
* 66 Tick
* 100 Tick
Most Source games run at 33 or 66 tick by default. Counter Strike Source for example runs at a default of 33 tick.
to apply a tick rate u have to run the dedicate server in console mode and add the command -console -tickrate 33 -hostname "kkkkSTRIKE"
Command Line Commands
There are some commands which can only be used in the Target box of your HL2 icon, or in the 'Set Launch Options' box of Steam. They cannot be used in the game's console or in your autoexec.cfg file. These are referred to as 'Command Line' commands, and the most useful of these commands are provided below
-heapsize [Kilobytes]: This command tells the Source Engine to allocate more RAM to the system heap, where it can be accessed by the game to improve performance by caching more game information in RAM and hence reducing loading pauses. The default heapsize varies, but can be 256MB or less. If you have 2GB of RAM you may wish to increase this to 512MB (a heapsize of 524288). You can use higher values if you wish, but I don't recommend exceeding half your physical RAM (e.g. for 2GB RAM, don't set heapsize higher than 1024000). You can't force the game to load completely into RAM, that's not what this command does.
-console: Speeds up the loading of a game by not loading up the background 3D graphics on the main menu and instead loading up a blurry background picture and the command console is open. Note you can close this console using the '~' key or clicking the x at the top right of the box.
Labels:
counter strike,
lag free,
os config,
rates,
server settings,
services,
tcp config,
tickrate
Subscribe to:
Comments (Atom)