DHS causes huge lags and eventually stops my server
When my friend (who also uses DH installed on their client) joins my server it keeps generating LODs and server lags a lot. If I try manually running
dhs pregen start world 0 0 110
it lags a lot, in the console I can see shortly before it stops:
and then additionally:
I've already tried changing settings in the config file:
I've already tried following https://discord.com/channels/881614130614767666/1035937626944962641/1350101909683572736 and https://gitlab.com/distant-horizons-team/distant-horizons-server-plugin/-/wikis/home and currently all I can do to play with friends is /dhs pause
as lags are unbearable14 Replies
how much ram does the server have allocated?
what hardware is running your server?
Try reducing the thread count
Do you mean
scheduler_threads: 8
to like 1 or 2 ? I tried that, it was 4 by default, now set to 8 and no difference
Command that I use to start, I have AMD 7800X3D and memory 64 GB 6000 MHz8 should use twice the memory and CPU resources of 4
2 will use half
Decreasing the lag
Try setting it to 1
You have not followed the recommendations of the wiki, which I directly advised in your previous post.
Your server undoubtedly prints a warning stating that "performance will suffer" ever time you start it
The reason you get lag is worldgen. It is triggered by DHS, but not directly caused by it
Solution
Use a server software that has asynchronous world generation, like Paper
And/or pregen your world
Both of these recommendations are on the wiki
Okay, I'm looking at https://gitlab.com/distant-horizons-team/distant-horizons-server-plugin/-/wikis/Recommended-setup again and it says
This pretty much rules out Spigot or any direct fork of Spigot, except Paper
So you're telling the solution is to remove Spigot and make the server again using Paper?You don't need to recreate anything. Just replace your server.jar with one from Paper
It's a drop-in replacement
Doesn't DHS do that? I thought if I set this option it'll generate world chunks as well as LODs
Okay, I'll try that, thanks!
It does, but areas that are pre-generated will be much faster to generate LODs for afterwards
If you tune DHS for your hardware, it is possible to get essentially the same performance as Chunky. But it is easier to just recommend Chunky
After replacing Spigot with Paper it seems to work better, there are colors in the console now LOL
I'm still testing...
And it doesn't lag the server when I run DHS pregen!
Haha, yes there is a reason the wiki says to avoid Spigot
And that the plugin prints "performance will suffer" when it doesn't detect a server capable of async worldgen
But I guess it was difficult to see that warning if you didn't have colors in the console before
Yes, you're right. I didn't notice it at all, when I start the server the console is bloated with a wall of text, now you told me and I check and indeed it was warning me.
I also didn't notice the notice
we recommend that you go with one that has asynchronous chunk loading. This pretty much rules out Spigot or any direct fork of Spigot, except Paper
I was going straight below to copy these Java flags.
Thanks a lot for helping me, it seems this issue is resolved :distanthorizons: