CPU-bound ticks
Blocks, mobs and redstone are processed in the main game loop. A slow single-core speed shows up as low FPS even when your GPU is idle and your RAM is barely used.
Minecraft Java Edition reference
Minecraft: Java Edition is powerful but easy to misconfigure, and most lag has a specific cause you can fix. This guide walks through the four levers that actually matter — how much RAM you allocate, which JVM arguments help, the in-game settings worth changing, and how to read a crash. Everything here is written to be applied from a modern launcher profile.
Start here
Knowing the cause stops you from changing settings at random. Almost every performance complaint falls into one of four buckets, and each has a different fix.
Blocks, mobs and redstone are processed in the main game loop. A slow single-core speed shows up as low FPS even when your GPU is idle and your RAM is barely used.
Java periodically frees unused memory. If your heap is too small the game stutters constantly; if it is far too large, each cleanup pause becomes longer and more noticeable.
Big farms, dense villages and crowded servers cost far more than pretty scenery. Rendering limits for entities and particles decide how much the client has to draw.
An out-of-date Java runtime or GPU driver can quietly halve performance. Matching the Java version to your Minecraft version is step zero.
F3 to open the debug screen. Watch the FPS number and, more importantly, whether it dips in a rhythm (a memory cause) or drops steadily when you look at builds (a render cause). The pattern tells you which section below to use.
Lever one
More RAM is not automatically better. The goal is enough room for the game plus a little headroom, without making each memory cleanup pause huge. Set the value in your launcher profile's Java / memory settings.
| Setup | Suggested RAM | Notes |
|---|---|---|
Vanilla, 1–2 players | 2–4 GB | Plenty for exploration and small builds. |
Light mods / shaders | 4–6 GB | Add a little for texture-heavy packs. |
Medium & large modpacks | 6–8 GB | Watch for out-of-memory crashes in the log. |
Very large packs / servers | 8–10 GB | Only if you actually see memory warnings. |
Lever two
These launch parameters tune Java's garbage collector so memory cleanups are shorter and more predictable. Paste them into your launcher's "JVM arguments" field for the profile you are tuning. They help most on modpacks and low-end machines.
-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions
-XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M
-XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15
-XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:+PerfDisableSharedMem
-XX:+AlwaysPreTouch -XX:+DisableExplicitGC| Flag | What it does |
|---|---|
-XX:+UseG1GC | Selects the G1 garbage collector, which balances short pauses on large heaps. |
-XX:MaxGCPauseMillis=200 | Asks the collector to target pauses of roughly 200 ms or less. |
-XX:InitiatingHeapOccupancyPercent=15 | Starts cleanups earlier so they stay small and frequent instead of one big freeze. |
-XX:+AlwaysPreTouch | Reserves memory at launch so the game doesn't stall while grabbing it later. |
-XX:+DisableExplicitGC | Prevents code from forcing full collections that freeze the game. |
Keep your allocated -Xmx (maximum memory) value paired with these flags — the flags change how memory is managed, not how much you have. If a tweak ever makes things worse, delete the field and start again; vanilla defaults are fine for light play.
Lever three
These options give the biggest frame-rate return per click. Lower them one at a time and watch the F3 overlay so you can see what each change buys you.
The single biggest lever. Dropping from 16 to 8 chunks can double FPS with almost no gameplay loss. 8–12 chunks is a good balance for most players.
Controls how far mobs and redstone are actually processed. Keeping it lower than render distance saves a lot of CPU without making the view worse.
Fewer mobs drawn means less work near farms and villages. Set it to 50–75% for a big gain in crowded areas.
Set to "Decreased" or "Minimal" to cut effects from fire, potions and mobs — helpful in combat and around machines.
"Fast" disables fancy leaves, clouds and smooth lighting. Switch back to "Fancy" only if you have headroom to spare.
Cap the frame rate slightly under your monitor's refresh rate to reduce input latency and heat. Vsync can add delay, so prefer a cap.
Lever four
Dedicated optimisation mods rewrite the game's rendering and logic to use your hardware far better than the vanilla client. Install them through the same loader you already use.
| Mod | Loader | What it improves |
|---|---|---|
Sodium | Fabric / NeoForge | Rewrites the renderer for a large, consistent FPS gain. |
Lithium | Fabric / NeoForge | Optimises game logic like block ticking and AI, cutting CPU cost. |
Iris | Fabric | Adds shader support on top of Sodium. |
FerriteCore | Fabric / Forge | Reduces memory use, which means fewer and smaller GC pauses. |
ImmediatelyFast | Fabric / Forge | Speeds up UI and entity rendering. |
Embeddium | Forge / NeoForge | The Sodium-style renderer for the Forge ecosystem. |
Troubleshooting
Match the symptom to the likely cause before changing anything else. The launcher keeps a log for each profile — that file is the fastest way to the real answer.
| Symptom | Likely cause | Fix |
|---|---|---|
| Freezes for ~1 second at regular intervals | Garbage collection pauses | Tune JVM arguments and set a sensible RAM amount. |
| Out of memory / "Java heap space" | Too little RAM for the pack | Raise allocated memory in 1 GB steps. |
| Crashes right at launch, no menu | Wrong Java version or a broken mod | Match Java to the game version, then remove the newest mod. |
| Works until you load a world | Corrupt profile or conflicting mods | Try a clean vanilla profile, then re-add content gradually. |
| High FPS in menus, low in world | Render settings too high | Lower render and simulation distance first. |
| Lag only near builds or farms | Too many entities / block updates | Reduce entity distance and particles; optimise the farm. |
Questions
Vanilla runs well with 2–4 GB, most modpacks with 4–6 GB, and very large packs may need 8 GB. Giving the game far more than it needs often makes collection pauses worse, so raise it only when you actually run out.
1.17 needs Java 16, versions 1.18–1.20.4 need Java 17, and 1.20.5 onward need Java 21. A wrong major Java version is a common cause of launch failures.
They mainly reduce lag spikes by improving how Java collects memory, which smooths out stutter on large modpacks. They add little to average FPS on a light vanilla setup.
Dense builds and many entities cost more than raw scenery. Lowering entity and particle distance plus simulation distance helps far more than changing resolution.
On Fabric, Sodium with Lithium usually gives the best raw frame rate, and Iris adds shaders. OptiFine bundles extra features but is generally slower than the Sodium stack on the same hardware.
Continue exploring
Companion guides for players who run Java Edition with custom launcher profiles.