Steam Support

Optimizing a Dedicated Server

How do I get the most from my Dedicated Server?
Both HL1 (HLDS) and Source (SRCDS)

HLDS and SRCDS Server Rate Tuning

There are three types of servers in Half-life and Source Games:

Listen Server

A listen server is launched within the game you wish to play.

It has a minimal control panel.

A listen server requires the Steam Client and your game to be running.

All the stock game content is contained in a single cache file.

Client HLDS Server

The HLDS Server is available from the Tools menu.

Players must connect to it from LAN or over the internet. (You cannot play from the same computer as is hosting the game.)

The HLDS server requires Steam Client to always be running.

It has a full server control panel.

All the stock game content is contained in a single cache file.

Stand-Alone HLDS_1120 Server or Source Dedicated Server

Stand-alone servers are independent from Steam.

It does not require Steam client to be running.

Players must connect to it from a LAN or over the internet. (You cannot play from the same computer as is hosting the game.)

There are no cache files, all game content and resources are unpacked.

Source Servers must be installed in separate folders from HLDS Servers.

Optimizing Server Priority

When running a Server under Win32, the default is to run the Server at normal priority.

Priority is basically a setting that tells the operating system what tasks to service first and for how long. Servers are very real-time applications and players are very sensitive to lag. Running your Server at normal priority can cause unpleasent lag. The solution is to run your server at High priority.

WindowsXP assigns every program and process running on your PC a priority which determines the relative amount of CPU time that it gets compared to other programs. XP offers several settings: Realtime, High, AboveNormal, Normal, BelowNormal and Low .

Warning:

Realtime is not recommended since it competes with the device drivers and can cause instability.

Most programs are assigned the Normal priority, but using the Task Manager you can change the priorities assigned to any process or program.

Instructions

To manually change the priority of a running program or process:

Open your Task Manager by pressing Ctrl+Alt+Del then clicking on the Task Manager button.

Click on the Processes tab.

Right-click on the program or process whose priority you want to change then highlight Set Priority and choose the priority for the program.

Note:

When you assign a new priority to a process or program, the new priority setting only lasts as long as the program or process is continuously running. The next time you launch the program, it will default to the priority assigned by Windows.

If you wish to launch your HLDS at high priority every time, you must use a batch file.

Your particular optimal setting may vary depending on your connection. Local players on LAN are not included in this count.

A good rule for HLDS is 35.6Kbits per player .

A good rule for SRCDS (Source Games) is 53.4KBits per player (about 1.5x more than HLDM).

Certain maps and MODs may take more uplink bandwidth.

This maxplayers setting also assumes you are running the following server rate limits (in the server.cfg file):

//minimum rate allowed
// use 5000 for SRCDS Servers
sv_minrate 3500

// no limit on maxrate for LAN only use 7500 for regular server
// this controls how fast maps can be downloaded by clients
//sv_maxrate 0 = unlimited
// Use 9999 for SRCDS servers
sv_maxrate 7500

// this is the minimum playable updaterate, leave this at 13
sv_minupdaterate 13

// 60 for updaterate is LAN ONLY use 13 for internet
// 20 is default but will cut the maxplayers you can handle in 1/2
// for SRCDS Servers use 30 - you might be able to use 20
// sv_maxupdaterate 60
sv_maxupdaterate 13

Testing Server Rates

You can use the following set of alias parameters to test your server rate quickly.
Put these in your server.cfg file:

Generic server.cfg for CS:S Servers

Generic server.cfg for HL2DM Servers

server.cfg files for SRCDS are placed in the CFG folder for each Game Type.

Server FPS Control

HLDS Servers render frames independently from the Client.

HLDS Servers use the CVAR sys_ticrate to control how many frames per second are rendered.

SRCDS Servers use the CVAR fps_max to control how many frames per second are rendered.

Why do you need to control this?

There are two good reasons for you to manage the server FPS. The number one reason is loading on your Server CPU. The higher the FPS the higher the load. If you are getting more than 50% CPU utilization with your current FPS settings, you are either running too many players or you have the FPS set too high.

HLDS Servers start with a default of 60FPS and can easily run up to 1000FPS (sys_ticrate 1000)

SRCDS Servers start with a default of 300FPS but can also run up to 1000FPS, though that framerate will require a substantially higher performance CPU.

Win32 Servers should be run on WIN2K / XP Pro platforms with HLDS on a 1.8GHz cpu and a minimum of 512MB of RAM and SRCDS Servers should be run on 2.2GHz CPUs minimum with 512MB of RAM.

FPS Boost

Unfortunately, both of these servers will not achieve these FPS settings on a Win32 platform without one tweak. In order for the server to get service from the operating system, there must be a high-resolution timer running. Normally, the operating system runs a low resolution timer that is only good for a max of maybe 100FPS.

Running Media Player (you need not play a file, just have it sitting there open) will force the operating system to use a high-res times that will give your server the capability of running up to 1000FPS. Media Player requires about 5MB while in idle, so it offers relatively low overhead for this improvement. You can also run a Macromedia SWF file in Internet Explore and it will do the same thing.

Intel vs. AMD CPUs

If you set sys_ticrate (HLDS) or fps_max (SRCDS) to 1000, most Intel CPUs running on Intel chipsets will run the full 1000fps (plus or minus a few). AMD CPUs and Intel CPUs on non Intel motherboard chipsets may only run at 500FPS with a setting of 1000.

WHY HIGHER FPS?

The key reason to run higher FPS is the render time. At 1000FPS, the server is rendering one frame every 1 millisecond (ms). This means that the worst-case adder to the player ping is only 1ms, IE: the player gets more accurate data and can get it more often.

At 300FPS it's only 3ms which is perfectly acceptable, but at 100FPS it's 10ms, which is a significant percentage of a 100 ping (10%). A player with a 100 ping would actually be getting 110ms response time from the server. Many AMD systems will only run 60FPS without the ping booster which is 17ms.

This is still not too significant but it can change the feel and response time of your server for players.

Without the FPS Boost your server will use significantly less CPU but accuracy may suffer.