Possible to offload LOD gen to clients or disable LOD gen on server?
I've installed DH on a modest mini-pc fabric server mc v 1.21.5 that I host a vanilla SMP on for friends.
Previously, I progenerated all the LODs for a large radius around spawn on my desktop cpu and distributed the lods in a zip file to the players.
I was quite excited to find out about server side support so we can skip that step, however when I installed DH on my server I noticed the CPU:
Intel Processor N100
4 Cores 4 Threads
Turbo Frequency 3.4GHz
was pegged at 100% with light travel and I was losing TPS getting:
[10:33:41] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 14648ms or 292 ticks behind
[10:34:31] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2065ms or 41 ticks behind
[10:34:55] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2000ms or 40 ticks behind
[10:38:14] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2348ms or 46 ticks behind
in my console.
I realize this is because the mod is now generating the LODs server side on my weak server CPU, however I have a very strong symmetrical 2.5gbps uplink so I was hoping I'd be able to either:
1. Have the clients process LODs on their CPU and upload the results (I realize this could be exploited, but for my needs its fine as I know all the players on my server.)
or more likely
2. Do not generate new LODs server-side and only use what is already available on the server and serve those - Since I progenerated a large area around spawn, just serving that to players would suffice and then their client side DH can generate and store any outside the progenerated radius.
11 Replies
you can replace the sqlite on the server with the one you generated locally
additionally you might want to experiment with
/dh config common.threadPreset
Yes I've done that, and now that I think of it I don't know why it is acting like its working hard to generate as I'm well within the pregen'ed area
So there is no way to just disable generation server side to test? I want no new lods to be processed on the server, only serve pregenerated ones
though on this kinda hardware you might also want to consider also generating vanilla world data. dh won't need to regenerate chunks to send lods to clients, but when players actually travel you'll have the same problem
there's something for it under
/dh config
after digging around a bit i believe it's /dh config generation.enable false
ah this is perfect thanks I've been searching around but wasn't sure exactly what I needed. will try that and report back.
btw, for server side, can i just type that as op and have it persist or do i need to modify DistantHorizons.toml?
changes should persist as they're immediately written to the toml
if you're having issues with that check file permissions
(noting this because dh sometimes yells in console about having issues accessing it despite new stuff being written just fine)
That instantly solved my issue!
I'm going to guess there is no way to do option 1, use the clients resources to generate new lods and upload those to the server?
not possible, no
you'd have to let one machine pregen, then upload the result
Aw, I think i understand why.
if itd be possible to compute the hash of what it should be faster than generating the lod you might be able to do it safely --ohhhh generation is CPU dependant.
curious if I messed anything up then by generating a circle around spawn on my desktop and then generating lods outside of that on the server....
dh stores lod data outside of vanilla's region files. they don't depend on each other in any way. only problem you might run into, is if you have the world border set to where lods end, and some of the chunks within the border lack vanilla world data. you'd have huge stutters when people get close enough to generate new chunks
Got it. seems like the issue is solved for now. Thanks a lot for your help!
np, glad to help