Allocate more memory

Why it stutters

Minecraft freezes every few seconds when the garbage collector runs. By default most launchers give it 2GB, which is barely enough to load. 6GB fixes the stuttering. 8GB if you use shaders.

How much to give it

  • Light modpacks (under 100 mods): 6GB (6144 MB)
  • Heavy modpacks or shaders: 8GB (8192 MB)
  • Don’t go higher — Java slows down when you give it too much

In the Modrinth App

  1. Right-click your instance and hit Options
  2. Go to the Java tab
  3. Turn off Use global settings
  4. Set Maximum memory to 6144 MB
  5. Restart the instance

The app handles the rest automatically. For normal play that’s all you need.

Optional: the ZGC flags

Only worth trying if Distant Horizons is stuttering for you. It’s an optimisation, not a fix, and DH already ships tuned for a mid-range setup — so skip this unless you’re chasing the last bit of smoothness.

In the same Options → Java tab, add to the arguments box:

-XX:+UseZGC -XX:+ZGenerational

This swaps the garbage collector for one that does its work in shorter bursts, which is what DH’s constant chunk loading tends to expose. Needs Java 21+.

If anything gets worse, delete the line — nothing else depends on it.

Still bad?

If it still stutters after bumping the memory:

  1. Check you’re using Java 21 or newer (the Java tab shows the version)
  2. Close Chrome/Discord/OBS while playing — they eat RAM
  3. Turn off connected textures in your video settings if you have Continuity installed

If none of that works, ask in Discord. Someone’s probably seen it before.