Rates guide for CS:Source
This guide is old now, and I’m aware of some glaring mistakes in it, try here: http://www.wheelchairjihad.com/?page_id=4 instead! (until I fix this one, which will have the server settings and fuller explanations in it again).
Update: It’s been TOOOOO long since this needed an update, so I thought I’d mutate it to something of a more detailed version of my other guide.
The sources of my understanding are CS:S/HL2DM documentation, Drek’s post in the steam forums, and the official developer wiki. Another good source for info is Whispers Wiki (use google and it’s search, it’s not well organised).
I am a network engineer, system architect and computer scientist, so if you respond, please don’t use b.s. or “plain English”; present your findings or claims in proper form, please. I’ve seen too many bad responses on this stuff, and I’m a little fed up of it all. I didn’t spend very long on this document, in fact in many ways it was very rushed, but the values that have come out are not unreasonable, and I have performed several sanity checks. These values and equations will give you a nice performance.
If you are just looking for client rates, you should read the “Simplest rates guide ever”.
TO BE REPLACED. Ok, so I didn’t update it all, I’ve removed a bunch of it. It’ll be back soon.
http://steampowered.custhelp.com/cgi-bin/steampowered.cfg/php/enduser/std_adp.php?p_faqid=254
Great maths.this works for us plebs :),maybe you could tweak it a bit
85.133.16.61:27130 for cz
213.239.175.117:27015 for source
Regards
Gary
Nice guide raggi! I’ve got an interesting problem with my cs-source though, which you might be able to nail. I’ve tweaked my router and pc’s MTU and RWIN to get the maximum connection speed. On my 2mb line I can get 240kb/s with my MTU set to 1472 with no fragmentation of packets.
However playing cs-source at an mtu of 1472 produces alot of loss or choke, with slight stuttering in game which appears to get worse as more players join servers. If however I lower my mtu to around 970 cs-source plays smooth as silk. My latency isn’t an issue as its always
In general your MTU settings should not cause a problem for CS:S as CS:S often deals with packets smaller than the MTU.
There should be no reason for source to play better on a lower MTU except in the exceptional circumstance that you have something along your connection that is responding better to smaller, and often fragmented packets.
This guide does need some re-working since the last few CS:Source updates but I have sadly been very busy. The new netcode responds alot more predictably and as such you may find you need to lower your cmdrate and updaterate a bit to get optimal performance.
Hey, I read your blog here.. and tried to understand it.. and it really worked for me. After using your cvars I dont need to empty my mags to get a kill. Its amasing :) GJ!
Good work getting through it.
Glad it was of use :)
Happy fraggin’
-raggi.
Hey againg, I’ve noticed one thing. There is no such command called cl_rate ?
It looks like this is getting an increasing amount of attention so I should re-do it soon (and fix those nasty blocks.
Yes, cl_rate is an old variable that was removed in a Source update this year.
There is no longer a bandwidth cap on outgoing data in the interest of proper bullet registration. This policy however means that your upload bandwidth use must be controlled solely by cl_cmdrate and cl_cmdbackup.
Ok. Sry to bother you again, but this rates thing interests me :)
I found a page that could tell me the exact internet line I’ve got.
True line = 857 / 423 (Its supposed to be an 1mb/512
The I tried to calculate my own rates:
Download:
857 megabits * 1024 = 877568 bits
877568 bits / 8 = 109696
rate “109696″
Upload:
423 * 1024 = 433152
433152 / 8 = 54144
cl_rate “54144″
cl_updaterate = rate / Upload 109696 / 423 = 259
cl_updaterate “259″
cl_cmdrate = cl_rate / Upload 54144 / 423 = 128
cl_cmdrate “128″
Is this optimal, or what should I use for rates.
*My rates now:
rate “109696″
cl_rate “54144″ (But lets forget this one)
cl_updaterate “259″
cl_cmdrate “128″
cl_smooth “0″
cl_lagcomp_errorcheck “1″
cl_interp “0.05″
thx - h0lmiE
gee’s you make it so simple thx raggi,
homie,
cl_updaterate 100, no need to go over that.
cl_cmdrate xxx, your average fps, use the Counter-Strike stress test in the game menu.. lucky u if your getting over 128 :)
so what should it be for a 512 / 256 connection?
becasue most servers force you to have rate above 13000, and updaterate and cmdrate above 40…
thanks
xanthropos
“most servers” don’t do anything specific, and certainly dont set your cmdrate and updaterate at 40. For a start that is a total waste of time for “most servers” which run at tickrate 33.
the guide is above, please read it.
i dont quite get all the maths >.
Raggi,
AWESOME man, I wrote off CS:S a while ago thinking it’s netcode was shittier than original CS which seemed spot on… then I tried your methods for setting CLIENT cvars and its like playing the original CS with MUCH better graphics! I added the cvars to other HL2 based games and they’ve improved 100% as well, this is good info and I’m surprised that Valve doesn’t do anything to publish these in their manuals for configuring netcode to work with certain netspeeds….
An important update:
VALVE RECENTLY CHANGED THE NETCODE: YOU SHOULD NO LONGER SET CL_SMOOTH 0 ON UP TO DATE VERSIONS. FROM NOW ON USE CL_SMOOTH 1.
THERE IS NO LONGER A NEED TO USE CL_LAGCOMP_ERRORCHECK (as we’re using cl_smooth).
I use cl_smoothtime 0.05.
Unfortunatly this did nothing.
I have a 4Mbps down and 1 Mbps up connection and according to the stress test have an avarage fps of 85 so acccording to the above I could alter my settings to 500.000, 100 and 80. I didn’t see any noticable difference though.
The odd thing is … I can have a ping of 20 to a server and STILL get loss and choke.
You should not be getting loss.
If you do, you need to check the capabilities of your connection, aswell as hop round some other servers to see if it’s a server side network problem too.
I get significantly better performance after lifting my rates, so I’m not sure why you have seen nothing. Are you familiar with FPS games in general?
ok… after figuring out what to do, it has greatly helped me :D
thanks man, you rule.
Great, thank you for persevering. Well done :)
What are rates for 56 modem??
Nice info here , but you dont explain what cl_cmdbackup does.
Sure.
It’s a number of command “packets” that are sent wiht the next command packet. This means, that say you’re sending the 10th bullet of a spray, the last 3 bullets occured all in the previous tick. With a command backup of 2, you will send both the current shots, plus the last three, plus the previous set. Current + command backup.
What this is really for is to cope with loss. The defualts will clearly cope with a loss of 2 out of 3 (network) packets. In general this is enough, loss over this ratio is considered a very bad communications line, and I would recommend moving servers if you get this bad a performance.
That having been said, I play on surf_* servers fairly regularly, and many of these are over in the US. Sometimes I get poor links/poor routes, when this happens, I often find (and this is another one of those emperical tests) that I get better performance (hit reg/general movement accuracy) when I increase cmdbackup.
As above, in general there should be no real reason to change this.
I have needed to update this for a while, but have not had time.
For the info of everyone, this is what I currently run on my local machine:
cl_smooth 1
cl_smoothtime 0.05
cl_interp 0.05
cl_interpolate 1
cl_cmdrate 70
cl_updaterate 70
rate 200000
I’m actually on an 8mbit connection now, but maps at 200k are more than fast enough :D
I recently got an upgrade on graphics card due to a failure of my old one (several heat sinks fell off amoung other issues), since then my machine averages around 50fps or greater. I leave vsync off (under max frame rate anyway, little difference made) and as a result I get quite good netcode performance despite the overspecification of my cmdrate.
For more information on this topic, try here:
http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
i’ve tryed those rates for 1 mb internet , i still get Choke, i seem to get it when fps goes below cmrate but if cmrate if lower than fps it would be 10 and thats to low. alos tryed cl_smothtime 0.05 and cl_lagcomp_eorrorcheck it didnt seem to help all the other players look choppy/laggy and sometimes players looksmoth and i look laggy ex my gun i reload it , it doesn’t do anything for at least 5 seconds and when it does the gun looks all choppy. any Idea’s why it’s like that
Rates i use 25000 , cmrate updaterate depending on server ticketrate (33 ,66,100)
Do you know what port number is used for counter strike source? I want to know for my router so I can use port forwarding. I checked on google and found port 27015 for the original half life, but I’m not sure if this is the same for HL2. Any help would be appreciated.
Nice blog by the way, I learned a lot reading through it!
Yep, it’s port 27015 for the SERVER by default.
Are you trying to forward for a server or a client?
Clients do not need port forwarding setup unless you have a particularly broken NAT, even then, it’s not much use.
For server. Thanks for answering my question so fast.
No problem. N.B. that there are other ports which may be important.
For more information, the GSP/HLDS Mailing list community, along with HoundDoug from UA have started: http://www.serverwiki.org
You should find some very good information there, as I and many others in the administration community are donating to the wiki.
i have a problem!!!
i used all ur rates and i get like 60-70fps wen i join a server for the first round… im on 256 up and 1.5mps down. anyways… after i play the first round and re-spawn my fps goes down to like 17 or less and jumps all over the place but never above 30 unless i stare at a wall or the ground… oh and wen i play the first round its smooth as and i get perfect kills so its really fucking with me wen it goes back down suddenly :S
Nice guide Raggi. I had a few questions though. Well i usually play CS 1.6 but i recently started CS:S and want to know what rates i can keep the same. I play on 56K but have actually goten my rates above normal dial up users.
rate 25000
cl_rate 9999
cl_updaterate 32
cl_cmdrate 32
cl_cmdbackup 2
ex_interp .1
i dont quite understand all the math so i was wondering if you could give me my optimal CS:S rates. Thx in advance. :)
RIGHT PEOPLE:
There’s a summary / easy to use rates guide over here, that’s slightly more up to date, and not _quite_ as rushed so it doesn’t have any of the glaring mistakes that are in the above.
It’s over here: http://wheelchairjihad.com/boards/index.php?topic=5.0
i need help. i play on 256k connection. my latency is always above 200. can u give me the exact rate,cl_updaterate etc etc.. to reduce ping. pls it would be a great help.
The most up to date and best thing to read is the simple rates guide I’ve linked you too above.
If _YOU_ *READ* that, you’d read:
“256kbps from your isp is roughly 25600 bytes per second, or ‘rate 25600′”
25600 / 200 = 128 (maximum number of full packets per second you can take (max updaterate))
128Kbps upstream: 12800 / 200 = 64. (maximal number of full outgoing packets per second (max cmdrate))
Of course, this would make alot more sense if you read the guide instead, as I really don’t have time to answer this question again, and again, and again.
There’s over half a million of you Source gamers out there, and over 50% of you will just ask this question instead of reading the articles I have spent time producing for people EXACTLY like YOU. Please do me a real massive favour and save me some time from my typically 100+ hour working week, and do some reading yourself, it’s not hard.
Hey i am trying to set my rate to lower my ping but i have an internet roughter and i dont know how to set it, so i can lower my ping a little bit…. My ping is usally 110 but i am trying to get it to lower into the 90’s it’s… The rate is set at 20,000 and i have a ping of 110 or more but, usally 110 and i am trying to lower ity a little will some one please help me…. what do i need to set it at…. PLEASE HELP ME….
If your ping is too high you need to lower your rates, not raise them.
You’ll also need to start thinking logically, and being accurate with your choices.
Start by working out what your internet connection speed is, and set your rates appropriately according to:
http://wheelchairjihad.com/boards/index.php?topic=5.0
Finally, ensure that you are playing on servers on the correct side of the ocean.
Hi,
The links arn’t working. Is this temporary or is the website like abandoned?
Yes, presently. I’ll see if I can get something sorted this month.
Hi.
Good design, who make it?
Hey I got awsome fps atleast like 200 each server i just have trouble with the rates and stuff :S like ill be shooting a guy for ages and no hits
It’s not just your FPS and your rates that count, it’s the server side FPS.
Hi Raggi
Nice topic, but as you can imagine times have moved on a little and things are so much faster now. Could you possibly post a good rate setting for me to use based on your theory and findings.
I currently running on a 20mb connection with the following averages:-
20038 kb/s Downstream
573 kb/s Upstream
32ms Ping
How can you see other players Rates in game as this really helped me when i stumbled upon it once.
Ty Bobo
TheWeedMan - Whilst source at 100 tick approaches the old 30kbps limit under certain conditions relatively regularly, it rarely goes significantly higher. My recommendations minimize burst choking, and processor load under these conditions. Technically speaking you could set your ‘rate’ very very high (on 20mb), but under the current engines there’s little point in going up to full speed, as the engine will simply never ever utilize that much bandwidth in a normal game. See the battlegrounds mod discussions for examples of where the limit was being hit on the regular. A more important problem is that most server admins will just scream and cry at rates > 30000, despite the fact that they have no idea about the tech behind their blind faith.
Bobo - if zblock is installed, zb_netinfo. if Mani is installed ma_rates (if allowed). There are some other plugins that allow this. “ping” shows you real ping times too.