Hello all,
We've recently been experiencing lag spikes. These are certain times when a game-tick stalls, leading to a typically 1-2 second freeze of our server, but sometimes up to 5 on higher loads. These seem to occur every minute or so, and although our TPS (average game speed - ticks per second) is usually able to keep up, when we get loads of higher than 200 our performance starts to fall behind, sometimes as low as 5 TPS with 250 people on.
We have isolated this issue to our NPC plugin, and tests have shown TPS increase drastically and the lag spikes stop when we temporarily disable it. The caveat to this is that, as one may expect, NPCs don't appear. We are currently using a method to display NPCs with a third party disguise plugin that was not designed to handle the large amounts of active playermodel disguises we are displaying. This used to be lag-less, though recent changes to the disguise plugin (and Minecraft) have greatly impacted it's performance. We plan to move to a lag-free packet based solution, but it will be some time, 2-3 weeks at the very least, until we can properly recode the way our NPCs are handled. When we finish this, old NPCs will reappear, the data will not be lost.
Given this we are considering the option of disabling NPCs to counteract the hit to performance, though we want community input on if this temporary trade-off is worth it. Note: Banks and auctioneers will still be usable though /bank and /ah at their locations, signs can be placed down in the place of the NPCs.
Cheers,
The Tech Team