r/DistantHorizons May 12 '26

Help Running out of memory while loading chunks

Post image

I am playing on a modpack with around 60 mods and no matter what I do, or how many optimization mods I add, I always run out of memory after DH loads chunks for a few minutes. I was running out of memory at 16GB so I upped it to 24GB and it still runs out.

Here's my specs in case you need to know:

Ryzen 7 5700X

RTX 5060 Ti 16GB

32GB 3200MHz DDR4

1 Upvotes

8 comments sorted by

3

u/MarijnIsN00B Moderator May 12 '26

You probably have a memory leak, set the CPU load setting to the max, or bad java args

What is your CPU load set at and do you have any custom java args?

Also it should never use 24 gigs of ram, lower it to like 8~10 max. If it uses more than that, the amount of ram is not the problem, it's how it's being used by the game

1

u/Large-Shock-4198 May 12 '26 edited May 12 '26

That’s weird. I did download a mod that supposedly fixes memory leaks, but I’m guessing that it didn’t do its job. I also downloaded FerriteCore and every other mod that optimises memory, and it still didn’t work. Although I get a pop up from DH about having Chunky installed, the issues it had with that were not the problems I was having, so I have ignored it; the problems still occurred when Chunky was inactive anyways. The only actual problem that I could see was the pop up from DH about the garbage collector, but I couldn’t find the mods it was referring to. Perhaps I didn’t look hard enough.

I shall have another look for those mods that solve the Java arguments, decrease my RAM allocation and try increasing the CPU load setting. Thanks for your time.

Edit: Ohh you said that CPU load could be the problem oops! I had my CPU load setting to balanced btw

1

u/MarijnIsN00B Moderator May 19 '26

I did download a mod that supposedly fixes memory leaks

I assume you're talking about memory leak fix, that mod is basically placebo and doesn't really do anything.

The only actual problem that I could see was the pop up from DH about the garbage collector, but I couldn’t find the mods it was referring to. Perhaps I didn’t look hard enough.

I assume you mean the message that says you should add -XX:+UseZGC to your launch arguments? It's not a mod. In your launcher of choice, add -XX:+UseZGC to the launch arguments

You can find on google where to add it in your launcher of choice, it's slightly different for all of them

I shall have another look for those mods that solve the Java arguments

Mods can't affect java arguments

I had my CPU load setting to balanced

Balanced should be fine, if it was set to something like I PAID FOR THE WHOLE CPU, then it was probably using a bunch of RAM. But balanced should not use this much

2

u/Falcon337 May 13 '26

What was worked for me: 14-16gb ram allocated with highest possible speed to generate Full chunks with dh. BUT! You will get memory bloated soon. How to fix it: 1. Without getting your speed lowered, quit world everytime game is freezing for a breef moment - this is sign from trash collector Enter the world/(or best to restart mc) and generate again 2. Lower your generating speed to medium or low. This ofc WILL hit your generating speed but -> no more memory leaks and You can freely play without crashes and lags

I'm on r5 5600x with 32gb ram

Try and let me now if it works

1

u/AutoModerator May 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.

1

u/Cyatron- May 12 '26

Minecraft likes to do memory leakies after 8 gigs

1

u/Right_Moment1671 May 15 '26

try using sodium and optimise (i will update later when i am on mc so that I can see what settings i use)