Lag spikes with distant generation enabled
Hi! I'm trying to use Distant Horizons, however, if I enable distant generation in the mod settings, I get very large lag spikes that get progressively worse as the world is loaded for longer, eventually completely hanging the game
Solution:Jump to solution
also I can confirm: the incompatibility is between distant horizons and geocluster
41 Replies
ram allocation?
16 gigs, increased from 8
probably too much. how come you increased from 8?
trying to fix this issue
once the hanging issue starts, modernfix gives a thread dump, I have no idea if anything in there might be a hint
give it 5-6 or you can switch GC if you want high ram allocation
If I see that, it means you have too much memory from the get-go...
okay, lemme try that
I should also mention that this is a modpack, although none of the mods I have are listed on the incompatible list
if ram allocation/gc doesnt help with that, test with dh alone
how would i switch the gc if i may ask
change flags in jvm arguments, you can google that (shenandoah/zgc)
same issue occurs with 6 gigs of RAM allocated
Have you changed any other JVM options other than memory allocation?
okay, lemme try with zgc
no (well, until now since I'm trying zgc)
Likely you still set too much memory then.
Well, no longer relevant now that you're switching GC.
i think I have too little memory set, because I seee the usage going to 100%, then I'm getting a huge lagspike, and it's only going down to like 80%
(with zgc)
I also got this now that I haven't gotten before before the game completely hung
you can raise that up with new gcs
otherwise ^
ZGC, to my experience, benefits having more memory. It suffers at lower memory much worse compared to G1.
it took longer, but I'm once again at a point where my memory usage is hitting 100%, dropping down only a little bit before hitting 100% and the app hanging for seconds while it does a hard GC (with 16 gigs ram allocated)
let me try with just dh and see if it happens there
okay, the issue doesn't seem to happen with just dh. what type of mod is likely to be incompatible, so i know where to start looking?
an interesting thing I did notice is that the world gen tasks climbs to pretty insane numbers, i don't know if that's normal or not
i suggest you try nightly build in #links-n-downloads
2.0.4 performance is a lot better
alright, lemme try that
it's a lot better on the nightly build, but after a while I still end up in the situation where I'm at 100% memory and the garbage collector can't seem to free almost any memory at all
ah, I think i might see what the incompatibility is
I think the hanging might've broken some things
Solution
also I can confirm: the incompatibility is between distant horizons and geocluster
more specifically, distant horizon's features worldgen seems to be incompatible - it seems that surface works alright
geocluster might do some cursed stuff
send latest.log
while using features
sec
DH only spit errors a few time related to geocluster
modernfix seems to freak out
might be debug/logging from modernfix
i think modernfix is detecting that the server tick is getting overly long and dumping threads to help with debugging
my best guess is that what's happening is that geocluster tries to spawn things on top of blocks as a feature, but distant horizons' worldgen doesn't actually generate blocks(?) and so geocluster's feature spawn code waits infinitely for a block that will never be generated
and eventually all these endlessly waiting threads fill up the RAM
that being said let me try without modernfix and see if that changes anything
issue still seems to occurr without modernfix
this time i even crashed due to OOM
just remove geocluster atm
thanks a lot for your help
Dang it I was hoping to see monoliths. All I got was a memory leak. 🙃
Yeah it looks like geocluster is trying to do something that is incompatible with DH's world gen. Looking at VisualVM they appear to just be infinitely adding items to a ConcurrentHashMap.
My guess is they're trying to generate something outside the 4x4 section DH uses when generating terrain. Might be worth bringing it up to them.
What in the world is that class tree???
Minecraft world gen 😎
If I can curse, I would've placed a stupid long list of curse words.
:mojank: moment...
atp sample the memory usage graph for the shapes of mountainranges :trolllaugh:
As far as I can tell the mod is abandoned, so even if I reported it I doubt it would get fixed
thanks for taking the time to look into what the actual issue is though!