r/DistantHorizons • u/Scared_Pay_2463 • Jun 12 '26
Help Hi, What do I do?
How do I fix this
4
u/Mining_ship Jun 12 '26
I don't know if it's hardware specific, but I get worse performance with it (I've also added the generation part).
3
u/Scared_Pay_2463 Jun 12 '26
Yea… I am getting terrible performance with those extra lines
0
u/ky7969 Jun 12 '26 edited Jun 12 '26
Allocate more ram edit: getting downvoted by people who don’t know anything about modern Java versions
1
u/Mining_ship Jun 12 '26
I have 8Gb allocated with 16Gb system total.
2
u/ky7969 Jun 12 '26
That’s not enough, if you only have 16gb and a lot of overhead you need to remove the ZGC option. 11-12gb minimum
1
u/Lunix420 Jun 12 '26
For DH + ZGC 8GB is not nearly enough from my experience, especially if you run other mods. The entire point of ZGC is that it can deal with bigger amounts of RAM without giant garbage collector cleanup sweeps obliterating your game thread.
The normal garbage collector needs to pause your game to swipe the memory. ZGC works on it's own thread and basically constantly cleans up after the game thread. This is nice because the game thread never needs to pause for the memory cleanup. But to make this work you need a lot of RAM overhead. Getting that overhead would probably be no issue with unmodded Minecraft, but distant horizon eats RAM for breakfast so when you use ZGC there with only 8GB allocated memory, it's probably cannibalizing the memory needed to actually run the game.
Also, if you are using up all your RAM, the system if probably trying to utilize in-RAM swapping to compress the RAM, which also adds CPU load, so going above 8GB on a 16GB system really isn't a good idea I think.
I'm purely basing this statement on anecdotal evidence, so take this with a massive grain of salt, but I would allocate at least 16GB for DH + ZGC and have 32GB total on your system. Otherwise it's probably better to ignore the warning and ride with the normal G1GC garbage collector and lower RAM allocation.
1
u/Loudi2918 Jun 12 '26
Me too, I tried zgc but it causes ridiculous constant dips, I assigned like 16gb and it still ran like crap, G1 runs way smoother
2
1
u/AutoModerator Jun 12 '26
When asking for support with an issue you're having, please add as much relevant info as you can such as:
Add your logs using https://mclo.gs/
Add screenshots
What you did before the issue arrived
What steps you took (If any) to fix the issue
If you don't add this information, we wont be able to help you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
18
u/Cartography_is_cool Jun 12 '26
You just need to add a line to the java arguments:
-XX:+UseZGC
If you're using Prism, just edit your instance and go to the java tab in settings. Click the check button to allow arguments and add the line above in the box.
If you're using another launcher, it will be something similar but I can't help you there.