Progress on lag detection


So I made some nice progress on the lag detection. What did I do?

  • I wrote a plugin that can, on request, record a list of all loaded chunks together with the current TPS into a database.
  • I setup a lagg monitor that launches the above plugin everytime when the TPS is low and then again when it recovers.
  • I made a modified version of our 2D map that displays chunks instead of lots. It takes the chunks from the database and weighs them according to how frequently they appear in the database (i.e. how often they were loaded by the server) and weighs the gap to ideal TPS (20) with the frequency of the presence of that chunk. So if a chunk was loaded once only during many low TPS events, it has less weight than a chunk which was more frequently loaded when TPS was low.


The result is this new 2D map. It shows only chunks that have a weighted TPS below 19. What you will see on all maps is that the chunks around spawn always remain loaded:

The kingdom spawn

On the other hand, it seems that places where villagers are, also seem to be over-proportionally represented. While it seems that there are places with villagers that are not showing up in the map, some chunks are permanently loaded, no matter what, even lots that are far away from active users, even on empty lots:

king_l20, a village on an empty lot

Obviously, the data is not 100% conclusive, there are so far only about 15 recorded instances. We have to wait until we get more data to take concrete conclusions. However, there seems to be an issue with villagers preventing chunks to be unloaded. This should not happen. That does not mean they cause massive lag. This map finally does not show where lag happens but which chunks are loaded when there is lag. There is of cause the issue that unloaded chunks cannot cause lag, but that does not mean that villagers are the cause of the lag. My hope is that once we have some more serious lag (so far we only went down to 18.11 TPS), there are some chunks that stand out. For this I will have to adjust the map display a bit more.

Further, this map looks only at places that we have actually mapped. I.e. darklands, nether and the_end are not represented here. I will make a report for those and warp around to see if I can identify locations with issues in those worlds.