If my "lerp" is yellow, what do I do?

Post Reply
User avatar
Edge100x
Founder
Founder
Posts: 12945
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

If my "lerp" is yellow, what do I do?

Post by Edge100x »

"lerp", also known as the interpolation period, is a client-side setting that is defined by the cl_interp and cl_interp_ratio variables (by default, cl_interp is set to 0, so cl_interp_ratio is used instead). Interpolation is used to smooth out the movement of objects in a multiplayer game, as described by Valve here: http://developer.valvesoftware.com/wiki ... Networking

net_graph shows the calculated "lerp" value and the game client also gives it a color based on whether it thinks it is appropriate. White is normal. Here's what Valve contractor Hidden Path Entertainment says about two other colors (http://forums.steampowered.com/forums/s ... ?t=1353969):
The indicator will turn yellow if the server's framerate (actual framerate on the remote machine) drops below [the interpolation] interval. This can be used to figure out why all of the objects in the world are no longer moving smoothly. In addition, the indicator will turn orange if the user or server has tuned the ConVars such that the interpolation amount is less than 2 / updaterate. This indicates that if there is any packet loss (or possibly choke if the choke is occurring for long periods of time due to large packets being sent over a low bandwidth rate setting) that the player will likely see sluggishness in the game.
The Orangebox client does not read the server FPS correctly and can't interpret values over 1000, so if you run your server at over 1000fps, it throws off the first of those two calculations, and your "lerp" will always be colored yellow. Since it's not based on correct data, yellow does not actually mean that there is a problem in this case. But, to be safe, you can double-check your realized server FPS with "rcon stats" to confirm that it's not actually dropping.

You can change your color back to white by adjusting your server FPS to 1000, or by altering your lerp (through adjusting cl_interp or cl_interp_ratio), but neither is necessary to improve performance.
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: If my "lerp" is yellow, what do I do?

Post by Edge100x »

For reference, the post linked above also states that the interpolation interval is calculated by this formula:

lerp = max(cl_interp, cl_interp_ratio/cl_updaterate)

For instance, if your cl_updaterate is 66, and you set set cl_interp to 0 and cl_interp_ratio to 2 (the default), your calculated lerp would be max(0, 2/66), or ~30ms.

By adjusting the lerp downward by changing one of the values in this equation, you can adjust the perceived shot registration of the game, but at very low values, you will also start to see objects skip around. For consistent gameplay, the default value of cl_interp_ratio usually gives a good result; always make sure that your cl_updaterate is also set to 66 (the tickrate of the server).
Post Reply