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:
also I can confirm: the incompatibility is between distant horizons and geocluster
Jump to solution
41 Replies
Rado
RadoOP•7mo ago
No description
MayBike
MayBike•7mo ago
ram allocation?
Rado
RadoOP•7mo ago
16 gigs, increased from 8
Yeshi
Yeshi•7mo ago
probably too much. how come you increased from 8?
Rado
RadoOP•7mo ago
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
MayBike
MayBike•7mo ago
give it 5-6 or you can switch GC if you want high ram allocation
Rado
RadoOP•7mo ago
hardester
hardester•7mo ago
If I see that, it means you have too much memory from the get-go...
Rado
RadoOP•7mo ago
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
MayBike
MayBike•7mo ago
if ram allocation/gc doesnt help with that, test with dh alone
Rado
RadoOP•7mo ago
how would i switch the gc if i may ask
MayBike
MayBike•7mo ago
change flags in jvm arguments, you can google that (shenandoah/zgc)
Rado
RadoOP•7mo ago
same issue occurs with 6 gigs of RAM allocated
hardester
hardester•7mo ago
Have you changed any other JVM options other than memory allocation?
Rado
RadoOP•7mo ago
okay, lemme try with zgc no (well, until now since I'm trying zgc)
hardester
hardester•7mo ago
Likely you still set too much memory then. Well, no longer relevant now that you're switching GC.
Rado
RadoOP•7mo ago
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)
Rado
RadoOP•7mo ago
I also got this now that I haven't gotten before before the game completely hung
No description
MayBike
MayBike•7mo ago
you can raise that up with new gcs otherwise ^
hardester
hardester•7mo ago
ZGC, to my experience, benefits having more memory. It suffers at lower memory much worse compared to G1.
Rado
RadoOP•7mo ago
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?
Rado
RadoOP•7mo ago
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
No description
MayBike
MayBike•7mo ago
i suggest you try nightly build in #links-n-downloads 2.0.4 performance is a lot better
Rado
RadoOP•7mo ago
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
Rado
RadoOP•7mo ago
I think the hanging might've broken some things
No description
Solution
Rado
Rado•7mo ago
also I can confirm: the incompatibility is between distant horizons and geocluster
Rado
RadoOP•7mo ago
more specifically, distant horizon's features worldgen seems to be incompatible - it seems that surface works alright
MayBike
MayBike•7mo ago
geocluster might do some cursed stuff send latest.log while using features
Rado
RadoOP•7mo ago
sec
Rado
RadoOP•7mo ago
MayBike
MayBike•7mo ago
DH only spit errors a few time related to geocluster modernfix seems to freak out might be debug/logging from modernfix
Rado
RadoOP•7mo ago
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
Rado
RadoOP•7mo ago
this time i even crashed due to OOM
MayBike
MayBike•7mo ago
just remove geocluster atm
Rado
RadoOP•7mo ago
thanks a lot for your help
BackSun
BackSun•7mo ago
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.
No description
No description
No description
hardester
hardester•7mo ago
What in the world is that class tree???
BackSun
BackSun•7mo ago
Minecraft world gen 😎
hardester
hardester•7mo ago
If I can curse, I would've placed a stupid long list of curse words. :mojank: moment...
Yeshi
Yeshi•7mo ago
atp sample the memory usage graph for the shapes of mountainranges :trolllaugh:
No description
Rado
RadoOP•7mo ago
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!
Want results from more Discord servers?
Add your server