Can't keep up! Did the system time change, or is the server overloaded? Running 2801ms behind, skipping 56 tick(s)
No, I'm not asking for a fix for that. I'm pretty sure it's just insufficient RAM.
I'm asking, what does the phrase "skipping xxx tick(s)" mean?
What I'm thinking is that Minecraft simply ignore the tick they skipped? So if a few commands are supposed to be running in that tick, it'll just be ignored? I'd like some technical answers, I'll try my best to understand. Thx
This simply means that the "game time" has fallen behind by the specified number of ticks; in other words, if you made an in-game clock it would fall behind real time by 1 second for every 20 ticks skipped; otherwise, the game is processing everything normally, just slower than usual, with the exception of player-controlled input (e.g. blocks reappearing after being broken since the server hasn't recognized that they broke yet while the client shows them breaking at the correct time. The server may also completely miss updates from the client, as happens when the blocks do not break after a delay).
Also, the main reason for this is not insufficient RAM but the CPU being unable to keep up; the last time I ran 1.13 it constantly spammed these warnings despite having plenty of free memory; otherwise, in 1.6.4 I only see this if I teleport to ungenerated chunks, with the time corresponding to how long it took to generate them (the server will generate and load all chunks before going on to the next tick):
23:17:28 - 2018-11-02 23:17:28 [SERVER] [INFO] [Player153: Teleported Player153 to 1000.5,100.5,0.5]
23:17:28 - 2018-11-02 23:17:28 [CLIENT] [INFO] [CHAT] Teleported Player153 to 1000.5,100.5,0.5
23:17:33 - 2018-11-02 23:17:33 [SERVER] [WARNING] Can't keep up! Did the system time change, or is the server overloaded? Running 4401ms behind, skipping 49 tick(s)
In addition, the server will process up to 40 ticks, only limited by how quickly they can be processed, if it falls behind (this is code from vanilla 1.6.4; the output above is from my own mod which includes the number of skipped ticks, which also correctly excludes the first 40 ticks from the number skipped, i.e. (4401 - 2000) = 2401 ms = 49 ticks, the actual amount of time that is lost after catching up; if it never falls behind by more than 2000 ms game time will not fall behind real time):
long var1 = getSystemTimeMillis();
for (long var50 = 0L; this.serverRunning; this.serverIsRunning = true)
{
// var7 is the time elapsed since the last normal tick
long var5 = getSystemTimeMillis();
long var7 = var5 - var1;
// Prints a warning if the time exceeds 2000 ms (2 seconds / 40 ticks) and limits the value of
// var7 to 2000
if (var7 > 2000L && var1 - this.timeOfLastWarning >= 15000L)
{
this.getLogAgent().logWarning("Can\'t keep up! Did the system time change, or is the server overloaded?");
var7 = 2000L;
this.timeOfLastWarning = var1;
}
if (var7 < 0L)
{
this.getLogAgent().logWarning("Time ran backwards! Did the system time change?");
var7 = 0L;
}
// Adds time since last update to a running total, which is decremented by 50 ms per tick
var50 += var7;
var1 = var5;
if (this.worldServers[0].areAllPlayersAsleep())
{
this.tick();
var50 = 0L;
}
else
{
// Loops until value of var50 is 50 or less, with no delay between ticks
while (var50 > 50L)
{
var50 -= 50L;
this.tick();
}
}
Thread.sleep(1L);
}
Also of note, there are open bug reports regarding server lag since 1.8, so they consider this to be a general issue with the game since that version, mainly due to their own terrible programming practices (there is absolutely no reason why even 1.13 should need 10 times the resources of older versions (1.6.4; 1.7.x also has a major performance issue due to something causing client-side ticks to take too long), especially when I've more than offset the impact of new content in my own mod):
This simply means that the "game time" has fallen behind by the specified number of ticks; in other words, if you made an in-game clock it would fall behind real time by 1 second for every 20 ticks skipped; otherwise, the game is processing everything normally, just slower than usual, with the exception of player-controlled input (e.g. blocks reappearing after being broken since the server hasn't recognized that they broke yet while the client shows them breaking at the correct time. The server may also completely miss updates from the client, as happens when the blocks do not break after a delay).
Also, the main reason for this is not insufficient RAM but the CPU being unable to keep up; the last time I ran 1.13 it constantly spammed these warnings despite having plenty of free memory; otherwise, in 1.6.4 I only see this if I teleport to ungenerated chunks, with the time corresponding to how long it took to generate them (the server will generate and load all chunks before going on to the next tick):
In addition, the server will process up to 40 ticks, only limited by how quickly they can be processed, if it falls behind (this is code from vanilla 1.6.4; the output above is from my own mod which includes the number of skipped ticks, which also correctly excludes the first 40 ticks from the number skipped, i.e. (4401 - 2000) = 2401 ms = 49 ticks, the actual amount of time that is lost after catching up; if it never falls behind by more than 2000 ms game time will not fall behind real time):
long var1 = getSystemTimeMillis();
for (long var50 = 0L; this.serverRunning; this.serverIsRunning = true)
{
// var7 is the time elapsed since the last normal tick
long var5 = getSystemTimeMillis();
long var7 = var5 - var1;
// Prints a warning if the time exceeds 2000 ms (2 seconds / 40 ticks) and limits the value of
// var7 to 2000
if (var7 > 2000L && var1 - this.timeOfLastWarning >= 15000L)
{
this.getLogAgent().logWarning("Can\'t keep up! Did the system time change, or is the server overloaded?");
var7 = 2000L;
this.timeOfLastWarning = var1;
}
if (var7 < 0L)
{
this.getLogAgent().logWarning("Time ran backwards! Did the system time change?");
var7 = 0L;
}
// Adds time since last update to a running total, which is decremented by 50 ms per tick
var50 += var7;
var1 = var5;
if (this.worldServers[0].areAllPlayersAsleep())
{
this.tick();
var50 = 0L;
}
else
{
// Loops until value of var50 is 50 or less, with no delay between ticks
while (var50 > 50L)
{
var50 -= 50L;
this.tick();
}
}
Thread.sleep(1L);
}
Also of note, there are open bug reports regarding server lag since 1.8, so they consider this to be a general issue with the game since that version, mainly due to their own terrible programming practices (there is absolutely no reason why even 1.13 should need 10 times the resources of older versions (1.6.4; 1.7.x also has a major performance issue due to something causing client-side ticks to take too long), especially when I've more than offset the impact of new content in my own mod):
If I interpret it correctly, "skipping xxx ticks" means that the game tick is delayed, in real world time, (yyy - 2000) milliseconds?
Seems to be the case. I've never encountered a time that I recall the game not executing a command block or function when mine falls behind in a very performance intensive situations
So I came across an error message in my server:
(example)
No, I'm not asking for a fix for that. I'm pretty sure it's just insufficient RAM.
I'm asking, what does the phrase "skipping xxx tick(s)" mean?
What I'm thinking is that Minecraft simply ignore the tick they skipped? So if a few commands are supposed to be running in that tick, it'll just be ignored? I'd like some technical answers, I'll try my best to understand. Thx
This simply means that the "game time" has fallen behind by the specified number of ticks; in other words, if you made an in-game clock it would fall behind real time by 1 second for every 20 ticks skipped; otherwise, the game is processing everything normally, just slower than usual, with the exception of player-controlled input (e.g. blocks reappearing after being broken since the server hasn't recognized that they broke yet while the client shows them breaking at the correct time. The server may also completely miss updates from the client, as happens when the blocks do not break after a delay).
Also, the main reason for this is not insufficient RAM but the CPU being unable to keep up; the last time I ran 1.13 it constantly spammed these warnings despite having plenty of free memory; otherwise, in 1.6.4 I only see this if I teleport to ungenerated chunks, with the time corresponding to how long it took to generate them (the server will generate and load all chunks before going on to the next tick):
In addition, the server will process up to 40 ticks, only limited by how quickly they can be processed, if it falls behind (this is code from vanilla 1.6.4; the output above is from my own mod which includes the number of skipped ticks, which also correctly excludes the first 40 ticks from the number skipped, i.e. (4401 - 2000) = 2401 ms = 49 ticks, the actual amount of time that is lost after catching up; if it never falls behind by more than 2000 ms game time will not fall behind real time):
Also of note, there are open bug reports regarding server lag since 1.8, so they consider this to be a general issue with the game since that version, mainly due to their own terrible programming practices (there is absolutely no reason why even 1.13 should need 10 times the resources of older versions (1.6.4; 1.7.x also has a major performance issue due to something causing client-side ticks to take too long), especially when I've more than offset the impact of new content in my own mod):
MC-44385 Server lag: Running 20215ms behind, skipping 404 tick(s)
MC-118106 High CPU usage, lag and poor performance on multiplayer / integrated servers
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
If I interpret it correctly, "skipping xxx ticks" means that the game tick is delayed, in real world time, (yyy - 2000) milliseconds?
Seems to be the case. I've never encountered a time that I recall the game not executing a command block or function when mine falls behind in a very performance intensive situations