Search Tricks, Hacks 'N More.
Custom Search

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.

1 comment:

  1. Thanks for giving information.It's very useful tips for beginners.When i had a lag problem while playing online game,i followed your way.After that i checked my lag rate whether it's low or high using WhoisXY.com I got good results.

    ReplyDelete