*new information: Linux servers can handle much higher update rates on the same bandwidth than Windows servers can, so if you are running a Linux server, start off by dividing by 200, not 300 as suggested here*

I answered this question in another thread, but I thought I'd give this its own thread, seeing as this is probably one of the most common, and important questions a server admin could ask. And that question is, "How do I set my server rates?"

The formulas I am about to give are extremely conservative, but they work. As long as there are no other problems, these rates will ensure that you get the most out of your available bandwidth. Some of the things I am going to say here are also probably somewhat controversial, but I am just sharing what I have learned in two years of running a server, and in the many many hours I have spent reading up on this topic.

This thread is not for newbies. I don't have anything against newbies, I just don't have the energy or the inclination to write a newbies guide to setting up a Half-Life server. I am going to assume that you already know most of the basics of setting up a server. I am also assuming that you are running a dedicated server.

This information will apply to small server operators who want to run a professional quality server on their home broadband connection. Home broadband connections will never be as good as a dedicated T1+ line for running a server, but it is possible to run a very smooth running, fun server off your home broadband connection.

The first question is operating system. I would recommend either Windows 2000 or Windows XP, Home or Professional. I would not recommend running a server on a Windows 9x/Me machine.

Note that these suggestions are for Windows servers, not Linux servers. The hardware requirements for Linux servers are probably quite a bit less than they are for Windows. However, it should be noted that Half-Life, from what I have read, will probably run slightly better on a Windows server, than it will on a Linux server. This is not because there is anything wrong with Linux, but because HLDS hasn't been optimized properly to run at its best under Linux.

I am assuming here that you are running some sort of adminning tools and perhaps stats plugins. I will take this into account in the calculations. What I am about to say here is also probably going to be somewhat controversial, but this isn't intended to start a war. This is simply based on my experience, and you can take it or leave it.

AMX has become very popular lately, and of all the adminning tools out there, it is probably the sexiest. However, if you want to get the most out of your hardware and connection, I would recommend that you not use AMX. Admin Mod + Statsme is, in my opinion, a better choice for CS and TFC, and just plain old Admin Mod is the best choice for NS and DOD. If you really want to run AMX, I would suggest that you use AMX Mod X instead.

The reason why I say this, is that, in my experience, Admin Mod + Statsme is less demanding on your hardware than AMX. AMX Mod X seems to be somewhat better written than AMX and seems to run more smoothly on small servers than AMX does.

However, take this information and do with it as you please, if AMX/AMXX works well for you, then by all means use it, and enjoy. The only thing you should be aware of is, the more plugins you add, and the more complex those plugins are, the greater are your chances that you will experience problems with lag.

Having said all that, here are my recommendations for minimum hardware requirements. These assume you are running Windows 2000/XP + with some kind of adminning tools and possibly stats. These are just general suggestions and you may find that you can operate perfectly well with less. Note also that certain mods are more or less demanding than others.

Server Size: 8
CPU: 800
RAM: 256MB

Server Size: 16
CPU: 1200
RAM: 384MB

Server Size: 24
CPU: 1600
RAM: 512MB

Server Size: 32
CPU: 2200
RAM: 768MB

Once you've gotten your basic hardware in place, then setting your rates becomes all about the bandwidth available to you. You need to find out what your upload and download bandwidth are, from your ISP. You then use the lower of those two numbers for all the following calculations.

Probably the biggest single mistake that server operators make is setting their various rates far too high. We, and I have thought the same way in the past, all tend to think that in order for Half-Life to run well, you need to allow your clients 100 updates per second, and give your cients 20000 as a rate for bandwidth. We seem to confuse update rate with FPS, or somehow think the two are connected, so if we have a very low updaterate, the game will be choppy. Because of the way Half-Life is designed this is not the case. I have run a perfectly smooth running server with an updaterate of 6, and I am fairly certain your update rate can be as low as 4 without causing problems.

Having said all that, and once your hardware is in place, the most important cvars for running a lag free server are the following.

sv_maxrate
sv_minrate
sv_maxupdaterate

You will find these in your server.cfg file. If they aren't there, you will want to add them.

The first thing we will address is sv_maxrate. This is what controls the maximum amount of bandwidth your clients can use. This is very important, but it is only as important, and maybe not quite as important, as your maxupdaterate. But it is the rate you want to calculate first, so we will do that here.

The first thing you want to do before you determine your rate, is determine how many slots you should run, what your server size should be. I will base this on two calculations, one conservative, and one less conservative, but, in my opinion, equally functional.

Generally the most bandwidth you will ever need to allow your clients to use is 6144. Anything above this is gravy. It is also entirely possible to run a server with a maxrate of 3072. I have run a server successfully with a maxrate as low as 2048. But the lowest I will recommend here is 3072. So here are the size calculations based on sv_maxrates of 6144, 4096 and 3072. Remember you are using the lowest of either your upload or download bandwidth for these calculations. For the purposes of these calculations you should always round down to the nearest number.

Note also that your bandwidth requirements per client increase as your server size increases. I do not recommend a rate any lower than 8000 for a server size larger than or equal to 24, 6000 for a server size larger than or equal to 16, or 4000 for a server size larger than or equal to 12.

sv_maxrate 8000

bandwidth in Kbps / 64 = recommended number of slots

sv_maxrate 6000

bandwidth in Kbps / 48 = recommended number of slots

sv_maxrate 4000

bandwidth in Kbps / 32 = recommended number of slots

sv_maxrate 3000

bandwidth in Kbps / 24 = recommended number of slots

So if you have 1400 Kbps in bandwidth available, and you are aiming for a sv_maxrate of 8000 you divide 1400 by 64 to get a server size of 21. If your hardware can support it, on that connection you can run a server with 21 slots. This server should run absolutely flawlessly with an sv_maxrate of 8333 (see below for where I got this number). Anything higher than 8000 is nice, but not essential to running a lag free, competetive server.

Running backwards you can calculate your sv_maxrate this way.

sv_maxrate = bandwidth X 125 / server size

So if you want to run a 24 person server, and you have 1400 Kbps in bandwidth available, 1400 X 125 / 24 gives you an sv_maxrate of 7291 (note that this is a bit lower than the minimum rate that I would recommend for a server of this size).

sv_minrate should always be set at 0. This will allow your dial up clients to set their rate as low as they need to so that they can play with as little lag as possible. DIAL UP CLIENTS DO NOT CAUSE LAG, BAD SERVER SETTINGS CAUSE LAG. HIGH PING KICKERS ARE UNFAIR AND A LOAD OF CROCK! There, I feel better now.

The last thing to calculate is sv_maxupdaterate. This is, perhaps, the single most important server side setting. And this setting should be much lower than you might imagine.

The calculation that I recommend for sv_maxupdaterate is as follows:

sv_maxupdaterate = sv_maxrate / 300

So for the above sv_maxrate of 7466 you would divide that by 300 to get an sv_maxupdaterate of 24. Basically, start off with this formula, and if you are still experiencing lag spikes or high pings, adjust it downwards, one at a time, until you get stable pings that are as low as you are going to get on your server.

*see my next post in this thread, four posts down, for more details on sv_maxupdaterate*

And these are I think, the most important considerations and cvars in running a lag free, smooth running server. I expect to stir up a bit of controversy here, and spark some argument, but honestly, this is based on <font color=orange>a lot</font> of experience, and <font color=orange>a lot</font> of reading. You are welcome to take my suggestions here, or leave them.

***Late breaking news: I have heard that these calculations work for Source. So if you are looking for help setting your rates for a Source server you can try these and maybe post back to this thread and let everyone know whether they worked for you or not.***

***Someone pointed out the official tweaking page from Valve to me. According to the information on that page SRCDS (Source Dedicated Server) requires about 1.5 times the bandwidth that HLDS requires. The calculations in this thread should still work, but to find the maximum number of players your connection can handle use this formula:

Upload Bandwidth (in Kbps) / 36 = Server Size

If your server size goes over 12 you will probably find that you will need more bandwidth per client.***

***Here is a website with some good information on tweaking your server:

Its a shame that it is so heavy on the advertising. I would recommend you not accept cookies from the advertising sites. All the information and tweaks there apply to HLDS as well as SRCDS except his hardware recommendations, and the FPS booster that he recommends. The registry tweaks are very good, as well as the advice. The tweaks to the Windows interface won't help your server any, but they aren't all bad either.

edit: I just noticed the advice on setting your rates on that site. You should completely ignore that, the rates he suggests are fairly out to lunch...

***I'm adding this because a few people have been asking about it. If you want the latest version of Booster you can find it here . The following are my recommended settings for Booster. I do not recommend more aggressive settings than this. These settings should improve your server's responsiveness, and I have found stability as well, without causing problems.

***It is worth noting that many server operators recommend that you not use a booster of any sort at all. sys_ticrate will also govern your server "fps". I have had good results with a systicrate of 250 for hlds on a Linux server. I have used -tickrate 66 for srcds on Windows but don't have much experience with srcds (note that with hlds the "systicrate 250" cvar belongs in your server.cfg while with srcds "-tickrate 66" would be a command line switch. There is <font color=orange>a lot</font> of conflicting information about what fps you should aim for. Generally the higher your server fps is, the more responsive your server will be, no matter what your rates are, but the higher your cpu usage will be. Many server ops use both ping boosting and a high tickrate. This is probably another situation where it is hard to give concrete advice, and you will have to experiment and see what works well for your server. Generally though, for hlds on Windows, I would still aim for a server fps of 100, but it appears that on Linux hlds does quite will with a much higher server fps.

*** the original post follows ***

Kbps is kilobits per second. That is usually what your ISP will give you your bandwidth in. So that was what I was using.

KBps is kilobytes per second.

Quote:

omg how long did it take you to write that? This has to be the longest Steam forum post I have ever seen!

lol I actually had to pare it down a bit, as it was originally longer than the forums would accept...

Quote:

How Long Did it take u to write all that?

A couple of hours I think, I'm not the world's fastest typist...

While I'm on the topic, here's another thing you can put in your server.cfg to make the most out of your bandwidth.

sv_voicecodec voice_speex
sv_voicequality 2

This controls a new voice communication audio compression codec that was introduced in Steam (this has been posted about in other threads but it is good advice so I thought I'd add it here). The voice quality ranges from 1 to 5 with 5 being the best. All five use less bandwidth than the present audio codec (Miles) and all of them except 1 offer better sound quality.

I do not recommend 1, but 2 is a good setting that still provides better sound quality than the old codec, and uses less than 20% of the bandwidth that the old codec uses.

***more information on sv_maxupdaterate***

The formula I give for sv_maxupdaterate is very general, and in most cases it will probably give you an update rate that is too high for your server. The best update rate for you will depend on your rate obviously, and also on your server size, as well as the mods you are running on your server. Generally the smaller your server size is, the higher your sv_maxupdaterate can be in relation to your server size. Also, the higher your sv_maxrate is, the higher your sv_maxupdaterate can be in relation to your server size.

For instance, this is all hypothetical, if you have a server size of 8 and a rate of 4000, your uoptimal sv_maxupdaterate might be 20, or 4000/200. However if your server size is 4, your optimal sv_maxupdaterate with the same rate, 4000, might be 26, or 4000/150. If you have a server size of 8 and an sv_maxrate of 8000, your optimal sv_maxupdaterate might be 53, or 8000/150.

The point is, that the only way that I know of right now to find your optimal sv_maxupdaterate, is to fill your server and see if your pings are stable and as low as they are going to be. If they are wonky, then adjust your sv_maxupdaterate down one at a time until your pings stabilize. If your pings are stable and as low as they are going to be, adjust upwards one at a time until they go wonky, then adjust back down to the last good rate.

Its annoying, but if you can get a full server and people don't mind a few problems until you get things sorted, then it won't take very long to get it right.

Well [WT] Deagle [TR if you were so clever you would have known and worked the following out:

ADSL is an Asynchronous connection which means you Download faster than you Upload.

If you want to host a server, you are ALWAYS going to be limited by your upload bandwidth.

FYG, network speed is always measured in bits, which is why I asked, its the standard way of measuring network speed, whether its Kilobits/Second, Megabits/Second, Gigabits/Second and it is not my fault if some people don't know the conventions.

Typical ADSL connection speeds are as follows:

256/128 Kbits
512/256 Kbits
1500/512 Kbits
3000/1500 Kbits

The sv_maxrate & sv_minrate is measured in Bytes

To Calculate the number of players you can run on your connection:

(Divide your theoretical upstream bandwidth which is in kilobits by 8) / (sv_maxrate / 1000) = Total number of players you can have.

Quote:

sv_maxrate 6144

bandwidth in Kbps / 48 = recommended number of slots

sv_maxrate 3072

bandwidth in Kbps / 24 = recommended number of slots

Lets have a look at this, if you have a 10Mbit Upstream Connection that gives you 1250 KiloBytes per Second of Bandwidth. According to the thread creators maths, if you use a sv_maxrate of 6144 then with 1250 Kilobytes of available Upstream BandWidth you will only be allowed to have 26 Players in total! 1250 KiloBytesPerSecond / 48 = 26.041666 Players

Thats despite the fact that even with an sv_maxrate of 20000, you still couldn't use 520 KiloBytes per Second.

I know its supposedly based on his sv_maxrate that in his opinion is all that people need (gl with that btw) but how the sv_maxrate of 6144 is related to the number 48 I will never know.

What I would like to know, after providing the above proofs, where the original poster came up with the numbers 48 or 24?

Did he just make these numbers up? Or is there some solid base in mathematical logic for these assumptions? Or is he trying out for a job with Valve, since the mathematical logic looks disturbingly familiar.

So if you have 1400 Kbps in bandwidth available, and you are aiming for a sv_maxrate of 6144 you divide 1400 by 48 to get a server size of 29. If your hardware can support it, on that connection you can run a server with 29 slots (so perhaps 28 with one reserved). This server should run absolutely flawlessly with an sv_maxrate of 6144. Anything higher than 6144 is nice, but not essential to running a lag free, competetive server.

If you have 1400 Kbps according to the original author, and he is talking about 1400 KiloBytes Per Second, that is faster than 10Megabit Internet Connection, even in theory!

How many of you out there have a 10Megabit Upstream Internet Connection?

In fact if you did happen to have a 10Megabit Internet Connection, why would that be an amazing to anybody that you could run a lag free server, no matter what settings you used?

Using my formula,

sv_maxrate 20000 / 1000 = 20KiloBytes per Second Per Player (sv_maxrate of 20000 is the maximum you can use)

32 Players * 20 KiloBytes per Second = 640 KiloBytes Per Second

10 Megabit Internet Connection = 1250 KiloBytes Per Second

640 < 1250 so no problems, you have plenty of room between the maximum theoretical bandwidth required and the maximum amount of theoretical bandwidth you can provide!

No some of you might feel Im tearing down somebody who is trying to be helpful.

You would be right.

But I do this because peddling incorrect information is really of no help to anybody and anybody who believes it won't have the sense or experience to know the difference.

It took me all of 5 seconds to look at the numbers and decide they were wrong, its taken me a bit longer to put it in a form that the rest of you migth understand!

In any case [WT] Deagle [TR you are still an idiot because I have explained this to you before, just about everybody who knows wtf they are talking about has had a stab at explaining this to you before, but even after 6 months, you still are not able to work all this stuff out for yourself.

just wanna say kilobyte my [color="#FF66FF"]♥[/color][color="#FF66FF"]♥[/color][color="#FF66FF"]♥[/color], somebody is actually willing to be helpful and the first thing people do is jump down on the post and pick at it.

Originally posted by Whisper Well [WT] Deagle [TR if you were so clever you would have known and worked the following out:

ADSL is an Asynchronous connection which means you Download faster than you Upload.

If you want to host a server, you are ALWAYS going to be limited by your upload bandwidth.

Typical ADSL connections are as follows:

256/128 Kbits
512/256 Kbits
1500/512 Kbits
3000/1500 Kbits

I'll come back to this later

long live google....

the guys done a nice job here dont mess it up with your nonsense
enough with your s.it u insult me and think that it will go by
without response who do u think u are?!
stuff it and leave it anything else PM me we can take it there
server master

im not angry about anything whisper i dont know u so i have no reason to be mad or anything i just feel its wrong of u
to insult people the way u did without knowing what trees i climbed up like most people starting there first server
thanks to Dreks calculation for the first time im running totally Lag free and Low ping so its all good for me and i am trying to spread out this information to all who doesnt know about it
with courtesy of Drek of course.... i think youll be surprised
how many people wanted to kiss Drek on the mouth for hes calculations, yes i am a noob with many things
but i have a saying that goes
"i dont know much about anything, but i know a little of everything"
that will go in history books one day