Out of Memory Error Even When Having a Ton of Memory Allocated.

As the title suggest the game crashes after a few minutes in a world when checking the logs it says "java.lang.OutOfMemoryError: null". Which is complete nonsense considering I gave MC about 70GB of memory. When In game the highest memory usage I seen is about 55GB. I guess my question is what am I doing wrong for this to be happening? I have the render distance set to 128 chunks which is the default, the only settings I did change was the LOD and how much of my processor it can use. I have it set to "I paid for the whole CPU" The error occurs at the end of the log. I should also mention that I primary play on a server ran by me so no chunk generation is happening on the client.
9 Replies
Miki_P98
Miki_P982mo ago
How much RAM do you have in your PC? Decrease you allocated RAM to Max 32 GB It will still be overkill and could hurt performance You might also want to tune your GC
GrimPlays
GrimPlays2mo ago
I have 96GB of system memory. I will lower allocated RAM to 32GB
Miki_P98
Miki_P982mo ago
Here are my GC flags if you are interested: -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+ZGenerational -XX:+AlwaysPreTouch -XX:+UseFastUnorderedTimeStamps
GrimPlays
GrimPlays2mo ago
Game is frozen now when trying to load the world. Log says something about out of memory. java.lang.OutOfMemoryError: Java heap space Hmm game lauched with 8GB of ram for some reason. Trying again. What is the expected memory usage when using DH? I can't image the devs expecting people having a ton of system memory.
Puhpine
Puhpine2mo ago
8-12 should be enough you can get away with as little as 4 it youre not generating new chunks
Miki_P98
Miki_P982mo ago
The closest estimate is: 4096 MB + (512 MB * {Your CPU's thread count}) At I paid for the whole CPU CPU load preset during initial world creation so ~20 GB for 32 thread CPU
GrimPlays
GrimPlays2mo ago
I have a 14 cores and 20 threads. This works about to around 14-15GB My last test is when I allocated 32GB when loading into the same world it uses all 32GB in F3 saying 100% of the memory allocated is being used.
Miki_P98
Miki_P982mo ago
Can you try with only DH installed? Or with DH, Sodium and Iris?
GrimPlays
GrimPlays2mo ago
Will do. Won't be able right now I will try it out in a few hours.
Want results from more Discord servers?
Add your server