PerformanceLast verified 2026-07-29

Distant Horizons Garbage Collector Stutter: Java Memory Fixes

Garbage collection is Java cleaning unused objects from the heap. Distant Horizons generation, shaders, resource packs, and large modpacks can all increase allocation pressure, but assigning an unlimited heap is not a reliable fix.

Common symptoms

  • the game freezes for a few seconds
  • RAM rises and suddenly drops
  • stutter appears during LOD generation
  • the problem is worse with a large modpack

Step-by-step fix

1

Use a measured heap size

Start with a moderate allocation that fits the modpack, commonly around 4–8 GB for many setups. Increase only when logs and usage show genuine memory pressure.

2

Reduce the workload before adding RAM

Lower LOD distance and quality, reduce vanilla render distance, and pause shaders while testing. This reduces allocations at the source.

3

Leave system headroom

Do not assign nearly all physical memory to Minecraft. The operating system, launcher, GPU driver, and other applications also need room.

4

Compare a clean instance

Run DH without the full modpack and compare the same route. A clean comparison separates Java pressure from a mod conflict or world generator.

5

Read the Java log

Look for repeated allocation failures, out-of-memory errors, or long pause times. Record Java version, heap flags, mod list, and the DH profile when reporting.

Still stuck?

Record your Minecraft version, DH version, loader, shader pack, GPU, and crash log before asking the community. That information makes compatibility problems much easier to diagnose.