In order to solve our current lag problem, I have made some considerable progress. The main issue is that Minecraft as such is not able to tell me where on the server the lag is being caused, I have to infer that myself by walking around and looking at things. Not really effective.
In the past I had a system that would record the position of users whenever lag was high and I tried to get an image from people’s positions. Also not ideal since people warp around and parts of the map might be loaded and where there are no people and those can still generate lag.
So my new strategy was to somehow get a list of all loaded chunks whenever the lag is high. In order to do that, I need to write my own Minecraft plugin however. And I am really bad at that.
However, with the help of Seanboyy and LukeCreative and some folks at the spigot IRC chat I managed to out something together that seems to do what I want. It’s not 100% operational yet but we are on the right track.
Once that is done I can create a heatmap as an overlay for the 2D map and then, hopefully pinpoint the areas where the map is generating lag. I would hope I have the first data to display by today, a working display by tomorrow and then the first results the day after that. Maybe even sooner.
There is a certain risk that there are so many chunks loaded permanently that it’s hard to pinpoint lag sources but with proper subtraction of those chunks during lag-free time we should get somewhere.
Let’s hope that we get something done here and a good tool to combat lag for the years to come.