How to Allocate More RAM to Minecraft (Java)

Guide Java Bedrock

Quick answer: In the Minecraft Launcher go to Installations, edit your installation, open More Options and change the -Xmx value in JVM Arguments (for example -Xmx4G for 4 GB). Vanilla runs fine on 2 GB; heavy modpacks want 6-8 GB. Never give Minecraft more than half your total RAM.

What you need

Step by step

  1. Check your total RAM first: 8 GB systems should assign at most 4 GB to Minecraft; 16 GB systems can go up to 8 GB.
  2. Open the Minecraft Launcher and go to the Installations tab.
  3. Hover your installation (or the modpack profile) and click the three dots > Edit.
  4. Click More Options to reveal the JVM Arguments field.
  5. Find -Xmx2G near the start and change the number: -Xmx4G for 4 GB, -Xmx6G or -Xmx8G for big modpacks. Do not touch anything else in the line.
  6. Save and launch. In-game, press F3: the top right shows memory usage - if it sits near 100% and stutters, raise the value one step.
  7. For servers, the same flag goes in the start command: java -Xmx4G -jar server.jar nogui.
  8. More is not always better: over-allocating makes Java garbage collection spikes worse. If 8 GB still stutters, the bottleneck is elsewhere (shaders, view distance, CPU).

Java vs Bedrock

Java Edition only. Bedrock (Windows, console, mobile) allocates memory on its own.

Versions: Applies to all Java Edition versions through the official launcher. Bedrock manages memory automatically - there is no RAM setting.

Frequently asked questions

How much RAM does vanilla Minecraft need?

The default 2 GB is enough for vanilla with modest view distance. Assign 4 GB if you use big render distances, high-resolution texture packs or shaders.

What about modpacks?

Light packs run on 4 GB, medium packs on 6 GB, and huge kitchen-sink packs on 8 GB. Assigning more than 8-10 GB usually hurts rather than helps.

Minecraft says 'out of memory' even after raising it?

Make sure you edited the installation you actually launch, that you are on 64-bit Java (32-bit caps around 1.5 GB), and that other apps are not eating the RAM you just assigned.

Related:How to Get XP Fast in MinecraftServersMods