While hosting a modded Minecraft server I receive random lag like entities slow down, chunks stop loading, eating food takes longer. The console is flooded with - server overloaded error messages. The CPU usage is usually at 30-40% and RAM usage at 4/8GB.
That’s fairly normal for modded Minecraft, as MC is a primarily singlethreaded game.
You can install the Spark mod and run a profiler that’ll tell you what mods are taking up the most CPU time.
A few things I noticed is if 1 person is online, it runs fine and if there are more, the Tps is likely to drop or the server just crashes.
Having a map and exploring just causes the server to crash.
I can provide 2 spark links, because I do not think that a mod is at fault for this lag.
This one was ran for a short amount of time after I had crashed the server running with a map in hand. After a minute and 30 seconds I just stopped the server with just 2 people on the server. spark | 4OImf55wN5
And this was me and my friend playing in loaded chunks for a bit:
To notice, for the exploration, the speed was not modified, just sprinting.
Sorry if the examples are not great, today while playing for an hour the server just crashed for 5 times in a row, so I am making a response because looking at the mod tab in spark, I only notice the mod “neruina” stand out with the server thread percentage.
Ah, that link expired, I’m a tad late checking my messages today.
If it’s modern minecraft with a bunch of mods installed, even just exploring regularly can bugger things a tad. I should also note that having your render distance too high wouldn’t help at all, if you’re on the default 10, I’d say drop that to 8 and see how it runs.
I will provide 2 screenshots with the most usual server thread usage.
I have already dropped the server render distance to 8 and after your response I dropped it to 6, but still same lag occurs, can agree that it is more rare now, but still happens. I think I will just give in to the thought that the mod pack is too big to play without lag on a server (for detail it is Prominence 2 [RPG] latest version)
From the looks of it, around half the server’s usage is going towards entities, which is sorta expected with a pack like that. Not entirely sure on how you’d resolve that though, could see if the modpack has a support discord or something similar and see if there’s been other server owners with the same issue and if they’ve found a way to resolve it.