Minecraft's Dumbest Server Performance Mod.
We beat out the competition with a simple philosophy:
If a sheep is 12 chunks away, and no one sees it, does it make a tick?
The answer is no, it shouldn't, and neither should lots of things that don't affect the player experience. So we simply turn it off! This record breaking 4x performance increase in performance allows our 310 mod modpack to run a server that supports more players than vanilla, at higher view distances.
This mod focuses on server side performance, so it may include a lot of different patches that we've added while doing performance testing, but among other things,
- LivingEntities will not spawn, render, or tick outside of an X block radius (now configurable!). This means creepers and skeletons won't spawn underground until you go underground to see them. When you go back above ground, until they despawn they will not waste time doing useless movement/AI ticks unless you're near them.They will freeze in place with no AI, which surprisingly works without any bugs so far.
- TileEntities are more important and will still tick of course, but they won't render past a certain distance to improve client frames. This is incompatible with Out of Sight considering it does the same thing without Sodium compatibility.
- Fluid updates will not run outside of X blocks from a player. This has integration with FTB Chunks, so if you claim chunks, this effect will be disabled. This has the compounded effect of reducing ItemEntity lag from destroyed blocks in the overworld.
- ItemEntities can cause servers to lag, especially during new chunk generation when players are flying around. When not in claimed chunks, items will tick at 1/4 speed. This results in a tiny bit of stuttering on dropped items, but greatly improves performance.
With all these patches, and more, our frametimes and TPS are solid even with 310 mods at 32 render distance:
Worried that this breaks vanilla mob farms? Simple! Install Woot! Or just claim chunks and AFK near it. Many of the features are disabled in FTB Utilities claimed chunks, so if you want more vanilla behaviour, remember to claim your base.
Now, understandably, some of the things we're doing are a little crazy by most standards, so you'll want to double check before installing this in your own pack. If you care about vanilla mob mechanics being broken, this isn't for you. If you want the highest performing server by any means necessary, you've come to the right place.
Other Improvements
- Added recipe caching.
- ServerChunkProvider was duplicating the chunk map list *every single chunk tick* just to shuffle it for apparently no reason. Maybe to randomize mob spawns? We could implement psuedo-random iteration, but sequential iteration works fine. This results in an improvement of over 1% total MSPT with just a single player moving around at 12 render distance alone, and is a completely "free" optimization.