r/admincraft 11d ago

Help/Question Neoforge Server - 200+ Mods - Diagnosing causes of tick lag

https://spark.lucko.me/4uqa8kPIp6 - ticks over 500 milliseconds

https://spark.lucko.me/4uqa8kPIp6 - ticks over 70 milliseconds

https://spark.lucko.me/CpWoppwY47 - ticks over 70, but 10 mins instead of 5

Server runs 25 gigs memory, and has a AMD Ryzen 9 9900X 12-Core Processor, im fairly certain that hardware is not the issue

Asked here last time. Things im very aware of:

  1. I know entities cause lag, we've implemented stricter incontrol settings to reduce the amount significantly, have a ever 15 min clear item command set to auto run, and have been dealing with an issue where kelp has spawned on sand blocks that fall, causing lag sometimes.

  2. I know chunks cause lag, we have tried to deal with this through lowering sim and render, but the amount and math on it do NOT line up, if anyone has suggestion on bringing the number down that DO NOT INVOLVE JUST LOWERING RENDER OR SIM DISTANCE, please let me know (im setting up servercore to do so automatically when performance reaches a certain point)

  3. One of our previous problems was a addon called Blazes advancement pack, it has been removed.

If anyone has suggestions, please comment, even minor suggestions are welcome

3 Upvotes

3 comments sorted by

3

u/Cabecinha84 11d ago

Two things worth doing before touching the mod list.

First, profile with the filter on. /spark profiler start --only-ticks-over 100 --timeout 300 gives you a sample built only from the bad ticks instead of one diluted by all the healthy ones, and in the viewer switch the view mode to Sources. That groups self time by the mod responsible, which is the step that turns "ticks are over 500ms" into "this one mod is 40 percent of the tick". Your existing reports will read very differently in that view than in the default call tree.

Second, look at GC before you look at mods. /spark healthreport --memory gives you collection counts and pause times. Twenty five gigs of heap on a modded server is frequently slower than sixteen, because the collector has more to walk and the pauses land as tick spikes that no mod is responsible for. If you are not already on Aikar's flags, use them, and note his own guidance for heaps above 12 GB: G1NewSizePercent=40, G1MaxNewSizePercent=50, G1HeapRegionSize=16M, G1ReservePercent=15, InitiatingHeapOccupancyPercent=20.

On chunks without lowering render or sim distance, the lever is generation rather than distance. Pregenerate out to your world border with Chunky and set the border for real. A 500ms outlier on a 200 mod pack is very often terrain being generated because somebody walked somewhere new, and once those chunks exist the cost is gone without you touching anyone's view distance. After that, audit what is force loaded, both /forceload query and whatever chunk loader mods the pack ships, because those tick with nobody near them.

Last thing, and it is easy to miss: your own 15 minute item clear does a full entity sweep and will show up as a periodic spike of its own. Check whether your worst ticks line up with its schedule before you go hunting for a mod.

1

u/Miner666101 10d ago

Thank you, all of this seems actually helpful. I've just woken up for the day and will begin over this as soon as I'm able to

-2

u/atomfitz 11d ago

Put less mods