max_lag exact meaning for server?

User avatar
lag01
Member
 
Posts: 190
Joined: Sun Mar 16, 2014 03:41
GitHub: AndrejIT
IRC: lag01
In-game: lag

max_lag exact meaning for server?

by lag01 » Wed Dec 31, 2014 16:21

Hello.
Today and several days ago on my server in /status output i saw "max_lag = 17.7148".
Reason i checked /status in the first place fas 3-10 seconds lag for placing/digging nodes and running commands.
Can and should i do something about this max_lag? Any other ways to debug server performance?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: max_lag exact meaning for server?

by Krock » Wed Dec 31, 2014 19:48

max_lag shows you the worst connection (lag time in seconds) from the server to a client.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
lag01
Member
 
Posts: 190
Joined: Sun Mar 16, 2014 03:41
GitHub: AndrejIT
IRC: lag01
In-game: lag

Re: max_lag exact meaning for server?

by lag01 » Wed Dec 31, 2014 21:28

Krock wrote:max_lag shows you the worst connection (lag time in seconds) from the server to a client.

Ok.
So one of clients have unreal laggy connection, i just hope it is not affecting another clients.
So to tell if that can affect overall server performance i need to read source *.cpp files...
 

proller
Member
 
Posts: 185
Joined: Sat Jan 26, 2013 15:22

Re: max_lag exact meaning for server?

by proller » Wed Jan 07, 2015 18:55

Krock wrote:max_lag shows you the worst connection (lag time in seconds) from the server to a client.

no.
 

User avatar
maikerumine
Member
 
Posts: 946
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: max_lag exact meaning for server?

by maikerumine » Wed Jan 07, 2015 19:12

Can a slower client have an affect on the server and other clients? Or is it only client side?
 

Zeno
Member
 
Posts: 140
Joined: Sun Jun 29, 2014 03:36
GitHub: Zeno-

Re: max_lag exact meaning for server?

by Zeno » Thu Jan 08, 2015 06:00

max_lag is kind of diffucult to explain. If you're interested in your **own** lag, RTT is the value you want to be looking at (not max_lag).

What max_lag (very basically) is how long the server takes to process a single "server step" (i.e. update the environment, make new map blocks, reply to all clients... stuff like that). Let's call that server_step_time. Every time server_step_time is greater than twice the current max_lag then max_lag becomes that new server_step_time.

Once the CPU processing spike goes away the max_lag decreases by .02% every server_step (unless it goes up again) until it again reaches the "normal" server_step time. This can take a while (maybe 5-10 minutes). So even if max_lag is showing, say, 5.6s the current server lag may be (and probably is) a lot less.

Anyway, from a client perspective RTT is the value you should be looking at, and that's for your client only. The minimum value for RTT is at least server_step_time, so it *is* kind of associated with max_lag for a particular instant but because of the way max_lag is calculated and decreased slowly it's not very well correlated at all (unless max_lag is constant).

Err, it's kind of complicated isn't it :/ max_lag is not really useful from a client's perspective at all because there is nothing the client can do about it. It's really more useful for people running a server and tuning server-side values. Even then, because max_lag is a weighted average (in effect) using a fixed value for the weight it's uses are (currently) limited (IMO)
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 28 guests

cron