From LinuxWorks Minetest Server Wiki
Jump to navigation Jump to search
UNESCO World Heritage Site
Inscription2017 (41st Session)

Lag is a physical effect that affects the gameplay a lot. There are few types of lag.

Types of lag

No-reason lag

This is the worst type of lag because of its unpredictability. No-reason lags appear and disappear when they want and nothing can't be done against them. The famous lagologist User:Gabriel says that these lags appear because of cache-misses.

Mapgen lag

Mapgen lags appear when someone is exploring new areas. These lags begin slowly but can be tough when they continue.

Mesecon lag

These lags appear because of the violation of server rules. Mesecon lags begin by construction of a laggy machine and end by a permaban. These lags can be very tough.

Mobile lag

These lags are caused by illegal Minetest forks. Some lagologists say that mobile lags haven't been approved so far.

Crowd lag

When there are too many players connected at once, crowd lags might appear. Kicking a few of them might help…

Login lag

When players are logging in and the server shows already signs of the "Crowd lag" then the additional load from the logins will increase the lag.

Packet-loss lag

This is a typical user-side lag: the internet connection drops packages and actions are sometimes execute immediantly or with a longer delay. The source can be a shitty bad internet connection of any type or a bad wireless connection to the device. This is also sometimes called 'inter-нет'-connection.


Lagometer is a machine designed for measuring lags invented by User:orwell.

Version 1

The original lagometer used a very simple average calculation utilizing the "dtime" variable. The lagologist User:Hume2 says that the lagometer showed bare nonsenses but User:orwell didn't get to doing something about this for a long time.

Version 2

The improved Lagometer now uses os.clock() instead of dtime and averages 2048 samples weighed by themselves. This lagometry appears to be more accurate and useful than Version 1.

Lag forecast

There's currently no way to predict lags but User:Hume2 offers a reward for a valuable forecasting method.


Lagometry is a science that measures the lag. The main concern of lagometry is measuring the average lag.

Let ((a, b〉, S, μ) be a space with measure where the (a, b〉 is an interval of time and μ is a measure called lagometric mesure where μ((a, b〉) = 1. Let f be a function (a, b〉 → 〈0, ∞) measurable by μ called lagometric function. The average lag is equal to integral of f over (a, b〉 by μ.

There are two known types of lagometry: Orwellian and Humean. The currently implemented lagometer uses the Orwellian lagometry.

Orwellian lagometry

The lagometric measure in Orwellian lagometry is the counting measure divided by the count of responses during (a, b〉. The lagometric function is a function that returns 0 when there's no response and the response time in the points where the response came.

User:Hume2 says that this lagometry doesn't give useful information when there is one huge response time next to many small response times.

Humean lagometry

The lagometric measure in Humean lagometry is λ1/(b-a) and the lagometric function returns the time until next response or 0 in the points where the response came.

According to User:Hume2, this lagometry should give more useful information than Orwellian lagometry but it wasn't tested yet.