Server tick-lag skyrockets once a player joins with Distant Horizons installed.
Distant Horizons is installed on the server. Once a player with Distant Horizons joins, the server immediately begins to lag and stutter. My best guess is that this is from the server trying to send the player LODs. I have tried multiple different combinations of mods on the server, and this only happens when Distant Horizons is installed and a player joins with it installed as well. The Distant Horizons config has not been touched and is default on the server, as well as on the client.
Some quick info:
- MC version [1.20.1]
- Distant Horizons version [1.20.1 Beta 2.3.0 forge/fabric]
- Forge version [47.3.27]
- Using a server host, not self-hosting
- 14 GB of ram
- 6 CPU cores
"Logs":
Check attached file.
"Specific error messages":
Not really getting any error messages, other than "Can't keep up! Is the server overloaded? Running [X]ms or [Y] ticks behind" being sent to the console often.
"Your mod list":
Pastebin link or check attached file.
"Multiplayer or Singleplayer?":
Multiplayer.
Pastebin
- achiopt 1.0.5 - advancementplaques 1.6.9 - aggroindicator 1.1.2+...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
43 Replies
14 gb of ram is lowkey an insane amount, try lowering it to 4-5.
seeing as how many mods you have, try 5, if not 6. 14 is going to absolutely tank
It will specifically help with
Not really getting any error messages, other than "Can't keep up! Is the server overloaded? Running [X]ms or [Y] ticks behind" being sent to the console often.
@OhDuffo
Wait, I don't mean to ask this in a rude way or anything, but lowering my ram will stop Distant Horizons from tanking my server?
I'm kind of suspecting that distantt horizons is not the thing causing your server to lag
14 gb is absolutely enough to cause server lag
it seems like it would be so that more=better performance
the way servers work is they will use as much ram as you give it, to the very last bit. so giving the server 14 gb isnt exactly giivng it 14 gb to work with, your basically telling it to use 14 gb ALL the time
it causes lag because your server is basically trying to manage, keep track of, and organize 14 gb of ram the whole time, as well as run the server normally
Try lowering it first, if that doesnt work install the mod spark, and run the command "/spark profiler start" and let it run in the backgroun while your server is up for a bit, 5 minutes is fine, then run "/spark profiler stop" it'll send a message with a link, go to it, then send it here.
https://www.curseforge.com/minecraft/mc-mods/spark
CurseForge
spark
spark is a performance profiler for Minecraft clients, servers and proxies.
115.7M Downloads | Mods
@OhDuffo any luck?
That's actually a lot of really good information! I'll be trying this stuff out tomorrow for sure. Thank you! I'll come back with an update then!
👍
If what’s already suggested won’t work you can try decreasing the server side DH bandwidth limit and CPU load
@OhDuffo Hey! Any update?
I'd like to chime in here, as I'm experiencing the same issue. Setting
distant_generation_enabled
to true leads to immense lag on the server. Disabling it immediately fixes this.
I'm hoping we have a common issue here and hence didn't want to start a new thread, which might cause us to do double work.
Attached is:
Spark profile with distant_generation_enabled: true
: https://spark.lucko.me/2r3mUaLNRm
Spark profile with distant_generation_enabled: false
: https://spark.lucko.me/vAITXXBqfg
These two reports have been started immediately after restarting the server after enabling or disabling the respective config, with two players online in the first report, only one in the second.
My server runs on my own hardware and has currently eight CPU cores (7950X3D) and 12GiB of memory assigned. This is only temporarily so high to rule out a bottleneck from it. The server is running great with two cores and 4GB of memory (ignoring DH).
Installed are only Chunky, dynmap & PlaceholderAPI as plugins.If you want both LODs and vanilla chunks using only DH to pregen both is faster and doesn't have the issues of using Chunky with DH
Chunky is only still installed from when the server was originally created; it's not currently used to generate anything anymore
That is really good to know though
@Tenou Unless you absolutely know that your server should be using 12 gb, I highly highly reccomend lowering it, especially from the profiler it doesn't look like you are using any mods. I run a server with 100+ mods on it, distant horizons included, and am able to sustain 8 players with no lag at all with just 5 gb assignned
Yeah it was only on 12 to test if that changes anything. It was previously on 4GB (is now on 4GB again), the issues were the same
Are you getting the "Can't keep up! Is the server overloaded? Running [X]ms or [Y] ticks behind" in the console?
Yes
What was the command you ran to start the spark profiler in your server exactly? if you can remember
spark profiler start --timeout 300 --thread *
I can provide you with the full log of that session, if it helpsHere you go, whether you want it or not :pepe_feelskek2:
Weird question, linux server's operating system @Tenou
is it mint?
It is not
Iirc it should be Ubuntu Server
Virtualized within PVE
Why the specific question after mint?
I'm reading into your profiler right now, and having a hard time pinpointing the source of the lag because spark is seeing that things are "waiting" which is what theyre meant to do
Just asking because I'm reading into it and just trying to think about what could be causing the lag
I do think you are correct that it is actually disttant horizons causing the lag
The issue is that it shouldnt be
I'm just gonna spitfire my ideas at you,
Have you tried this on a different world? As in deleting the current world folder and running the server again to let it regenerate
Also, if I were you I'd try a fresh install of java just because it cannot hurt
I just use openjdk
sudo apt install openjdk-21-jdk
As well as just upgrading and updating your system sudo apt update
and sudo apt upgrade
Hopefully these can help in some way, but in your server thread you can see that the bukkit chunk load is definitley causing some issuesGood to see we aggree on that :kek:
I have not yet, no!
I'd be happy to give it a shot, just can't promise it right away
Understandable lol
If the umbrella solutions I provided don't work, I would think about trying to host without any plugins and see
Just so you know, this system is not just running this single server, there's others. This is just the one I've tested DH with server side. It's on a current state regarding operating systems and software.
Oh good to know
That's a little tricky then, you don't want to try to update the whole systems java or something, that could possibly cause problems for the other servers
Servers are running inside containers, the containers are recreated on every startup - that includes a reinstall of openjdk.
Nevermind!
Then yes, I would just try a fresh install in the container for the test server, just to see, it cannot hurt
I have just installed the plugin on another test server, let's see if it behaves the same way
Also no chunky, dh has it's own chunk generator
Ye, Miki mentioned already
oh! great
Chunky isn't used anymore, it's just there from when the server was initially created
Great
The reason I'm suggesting the java install and upgrade and whatnot is because distant horizons SHOULD be stable on its own, I don't see any major flags as to why it's causing lag, which is why I'm thinking the only thing that could be causing this is a java or some other library issue on the server
you seem to have done everything correctly
Unrelated to the issue, can one interact with the plugin via commands to initiate LOD generation or whatnot?
I've had a hard time finding any docs on it and didn't wanna start reading the sourcecode yet
Sorry, that I'm not sure, I use the mod version
Gotcha
For the mod version however
its /dh pregen start [DIMENSION] [x, z] [radius]
Nah, that doesn't work
Hmm, yeah it would be best to ask someone else about the plugin commands, sorry
I gotta go, I'll respond later with the findings of my further tests
Thank you very much already for your support
I appreciate that
So this happened during my tests
I was flying an elytra, suddenly stuck mid-air with it, as if there was an invisible wall I was flying against
Might be related, might not be
Once the sqlite database has somewhat filled with data, performance seems to somewhat stabilize
There still is a noticable, somewhat heavy impact, but it's a LOT less worse than when starting with an empty database