TPS inconsistencies
whoshenry opened this issue ยท 4 comments
When I do /lag I get a different TPS to what /tps says - http://prntscr.com/9r7s6o
Essentials uses the plugin scheduler to measure ticks. Spigot uses the server tick scheduler to measure ticks. Spigot dynamically adjusts the plugin scheduler as needed to improve performance. They are two different measurement methods that will yield different results in certain scenarios. Spigot's TPS indicator also uses a moving average over 1, 5, and 15 minutes, respectively, which does not compensate for lagspikes. Hence, in your scenario (lagspike), Spigot's 1-minute average is not displaying correct result.
tl;dr: Essentials is more accurate because it uses a shorter period to calculate averages for, which indicates lagspikes more effectively. Spigot's is not because it's an average over a minute.
Upon further investigation, this seemed to occur alongside the chat not showing up for the server, certain commands weren't executing and it seemed like the server was in some sort of limbo.
Spigot version - CraftBukkit version git-Spigot-db6de12-07c3001 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
Essentials X version build - #251
TPS is always going to be different if:
- It's not an integer.
- It's not 20 (full).
Certain plugins do TPS in certain ways. Some might take a few seconds before the first output of TPS is accurate.
Yeah I know TPS will be different but it has never been this different before, once the server restarted the issue was resolved until it will happen again as it coincides with the chat not appearing.
A difference of 13TPS to 19.9TPS is quite a difference for a command that essentially shows the same thing. I've only experienced this issue recently, perhaps with the latest build of Essentials X.