Rate & Cmdrate


Here is a very helpful Rate & Cmdrate tutorial that I found:

Hi my name is bloke and I’m from Holland and I’ll try to explain how rate’s
And network in relation to the game works for hl1 and hl2 (Source) related games

First of all we have a number of setting to affect these aspects
– Client
• Rate
• cl_updaterate
• cl_cmdrate
• ex_interp
• cl_predict (1) (Source)
• fps_max

– Server
• sv_maxrate
• sv_minrate
• sv_maxupdaterate
• sv_minupdaterate
• sv_maxcmdrate
• sv_mincmdrate
• sv_unlag (1)
• sv_client_cmdrate_diffrence (Source)
• sv_client_interpolate (-1) (Source)
• sv_client_interp (0.01) (Source)
• sv_client_predict (1) (Source)
• sv_client_max_interp_ratio (2) (Source)
• sv_client_min_interp_ratio (1) (Source)
• sys_ticrate
• tickrate (Source)
• fps_max

• Commands proceeded by sv_ or sys_ are server side commands and must be used in conjunction with the rcon command.
Typing these commands without rcon will return the values set on YOUR computer,
not the actual values used by the server.

—RATE—

rate (Client)
sv_maxrate (Server)
sv_minrate (Server)

What is rate:
rate 1=max 1byte/s | rate 10000=max 10kbyte/s | rate 30000=max 30kbyte/s

“Clients usually have only a limited amount of available bandwidth. In the worst case,
players with a modem connection can’t receive more than 5 to 7 KB/sec.
If the server would tried to send them updates with a higher data rate,
packet loss would be unavoidable. Therefore, the client has to tell the server its incoming bandwidth
capacity by setting the console variable rate (in bytes/second).
This is the most important network variable for clients and it has to be set correctly
for an optimal game play experience.”

These days however more and more people get high or medium bandwidth capacity and the days of getting?
only 4 to 7 Kbyte/s are over.
I have an internet -Upload: 1.5mbit/s (187kbyte/s) -Download: 6mbit/s (750kbyte/s) Cable
medium network starts at:-Upload: 300kbit/s (37kbyte/s) -Download: 500kbit/s (62kbyte/s)
this will make you able to use a rate 20000 since that is only 20kbyte/s and you’ll even have some to spareIf you might notice I use 2 different measurements bit and byte the relation between these 2 is easy8bit =rate 1 byte | 80bit =rate 10 byte | 80kbit =rate 10000 byte (10kbyte) | ect. ect.

Clients can increase or degrease data rate values with rate (in bytes/second).
Servers can limit data rate values requested by clients with sv_minrate and sv_maxrate (both in bytes/second).

—CMDRATE—

cl_cmdrate (Client)
sv_maxcmdrate (Server)
sv_mincmdrate (Server)
sv_client_cmdrate_diffrence (Server/Source)

What is cmdrate?
cmdrate 1=max 1 update p/s | cmdrate 10=max 10 update’s p/s | cmdrate 100=max 100 update’s p/s

“The client creates user commands from sampling input devices with the same tick rate
that the server is running with. A user command is basically a snapshot of the current
keyboard and mouse state. But instead of sending a new packet to the server for each user command,
the client sends command packets at a certain rate of packets per second (usually 30).
This means two or more user commands are transmitted within the same packet.
Clients can increase the command rate with cl_cmdrate. This will increase responsiveness
but requires more outgoing bandwidth, too.”

“This command determines the number of packets per second that you, the client, will send to the server.
Obviously, the higher this value is, the quicker the server will respond to commands you execute.
If you have a broadband connection and you are the only person playing on it,
there is most likely nothing wrong with a high value. If you’ve ever LANed at a friend’s however,
and noticed insane lag spikes, this command is the culprit.
Most broadband connections don’t provide you with an abundance of upstream bandwidth,
which is what this command requires?”

Clients can increase or degrease the cmdrate with cl_cmdrate
Servers can limit the cmdrate with sv_mincmdrate or sv_maxcmdrate
Servers can set the Client max cmdrate/updaterate difference with sv_client_cmdrate_diffrence