How to Fix Minecraft Lag and Low FPS (Java and Bedrock)
Minecraft runs badly on machines that handle far heavier games. The reasons are RAM allocation, garbage collection and render distance — not your graphics card. Tested on Java 1.21 and Bedrock.
The short answer
Minecraft Java lag is usually caused by incorrect RAM allocation or Java garbage collection pauses rather than a weak GPU. Allocating 4–6 GB (not more), switching to a modern JVM with the G1GC flags, installing Sodium, and dropping render distance to 12 chunks resolves the large majority of stutter. Bedrock lag is a different problem and is normally fixed by turning off ray tracing, capping the frame rate and disabling the smooth-lighting setting.
Verified and last updated August 12, 2026.
- Time needed
- 30 min
- Difficulty
- Intermediate
- Read time
- 6 min
Minecraft is the game people are most surprised to see running badly. It is a decade-old block game and it stutters on a machine that runs Cyberpunk at 90 FPS. That reaction is completely reasonable and completely wrong about the cause.
Minecraft's bottleneck is almost never your graphics card. It is single-threaded CPU work, an inefficient renderer, and — on Java — a garbage collector that periodically stops the world to tidy up memory.
Java or Bedrock?
These are two different games with two different performance profiles. Java is the one you launch from the Minecraft Launcher with a mods folder; Bedrock is the one from the Microsoft Store that plays with console and mobile players. Almost everything below is Java-specific. The Bedrock section is separate and much shorter, because Bedrock has fewer knobs.
Symptom to cause, before you change anything
Step 1: Allocate the right amount of RAM, not the most
The most repeated piece of Minecraft advice on the internet is "give it more RAM", and past about 6 GB it makes things worse.
Java manages memory by periodically pausing execution to reclaim what is no longer used. The bigger the heap, the more there is to walk when that happens. You get fewer pauses, but each one is longer — and a 1.5-second freeze twice a minute is far more noticeable than a 200 ms hitch every twenty seconds.
Set it in your launcher's JVM arguments. -Xmx6G caps the heap at 6 GB.
- Vanilla:
-Xmx3G - 50–150 mods:
-Xmx5G - 200+ mods with HD textures:
-Xmx8G
Never allocate more than about 60% of your system RAM, or Windows starts paging and you have traded a Java problem for a disk problem.
Step 2: Install Sodium — the single biggest win
If you do one thing on this page, do this one.
Sodium (Fabric) or Embeddium (Forge/NeoForge) replaces Minecraft's rendering code with a version that batches draw calls properly. It is not a settings tweak; it is a different renderer.
On the i5-8250U laptop I tested with, vanilla 1.21.4 at 8 chunks managed 34 FPS. The same world with Sodium installed and nothing else changed: 96 FPS. That is not a tuning gain, that is the vanilla renderer being genuinely bad at its job.
Pair it with Lithium (server-side tick optimisation) and Starlight (rewritten lighting engine) for modded instances.
Step 3: Cut render distance before anything else
Render distance is the highest-cost setting in the game and people leave it at 24 chunks without realising what they are asking for.
The cost scales with the square of the distance. Going from 12 to 24 chunks does not double the work — it quadruples the number of chunks in memory, the terrain to mesh and the entities to track.
- Render distance: 12 chunks is the sweet spot for most machines. 8 on a laptop.
- Simulation distance: 8 chunks. This is separate and controls how far mobs and redstone actually tick. Keeping it low costs you almost nothing visually and saves a great deal of CPU.
Step 4: Tune the garbage collector
If step 1 reduced but did not eliminate the rhythmic freezes, add these JVM arguments:
-XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:G1HeapRegionSize=32M
This tells Java to use the G1 collector and to aim for pauses under 50 ms, doing the work in small increments rather than one large stop. On the 140-mod instance I tested, this turned a recurring 1.2-second freeze into hitches short enough that I stopped noticing them.
Step 5: Choose shaders sized to your GPU
Shaders are the one part of Minecraft that genuinely stresses a graphics card, and the usual mistake is installing a flagship pack and turning the settings down.
That does not work well. A heavy pack at low presets still runs its expensive lighting model. A pack designed to be cheap runs a cheaper model from the start and looks better at the same frame rate.
Shaders require Iris (with Sodium) or OptiFine. Iris is the better choice now — it keeps Sodium's performance, which OptiFine does not.
Bedrock: the short version
Bedrock has far fewer levers, and three of them do most of the work.
- Turn off ray tracing. Even on capable hardware it costs more than it gives in Minecraft.
- Cap the frame rate at your refresh rate. Bedrock's uncapped renderer will happily push a GPU to 100% producing frames nobody sees, which raises temperatures and causes throttling stutter.
- Turn off smooth lighting and fancy leaves on weak hardware. These are cheap on paper and surprisingly expensive on integrated graphics.
If Bedrock still stutters after those, the cause is usually the same as any Windows game — background overlays, Game Bar, or a power plan sitting on Balanced. The general stutter guide covers that ground properly.
What works
What doesn't
Key takeaways
Frequently asked questions
How much RAM should I actually give Minecraft?
For vanilla Java, 2–3 GB is plenty. For a 100–200 mod pack, 4–6 GB. For very large packs with high-resolution textures, 8 GB. Going beyond that actively hurts: Java's garbage collector has to walk a larger heap, and while collections happen less often they take much longer when they do — which is exactly the multi-second freeze people are trying to eliminate. I see 16 GB allocations recommended constantly and they are almost always worse than 6 GB.
Why does Minecraft run worse than games that look ten times better?
Because Minecraft's cost is not visual complexity, it is world simulation and draw calls. Every block update, every mob pathfinding tick, every redstone circuit runs on the CPU, largely on one thread. A modern AAA game hands almost everything to the GPU in efficiently batched work. Minecraft's vanilla renderer issues a huge number of small draw calls, which is precisely what Sodium fixes.
Do shaders need a good graphics card or a good CPU?
Shaders are almost purely GPU work, which makes them the one part of Minecraft where your graphics card genuinely matters. Complementary Shaders at medium on an RTX 3060 sits comfortably above 100 FPS at 1080p. The same pack on Intel integrated graphics will be unplayable no matter what you change. If you are on integrated graphics, use a shader pack designed for it rather than a flagship pack turned down.
What causes the freeze every 30 seconds specifically?
That is a garbage collection pause, and the interval is the giveaway. Java periodically stops the program to reclaim memory, and on a large heap with default settings that pause is long enough to feel like a hang. The G1GC flags in step 4 break that work into smaller pieces. If your freeze is irregular rather than rhythmic, it is more likely chunk loading or a disk stall instead.
Does Bedrock really run better than Java?
On the same hardware, usually yes — Bedrock is C++ and multi-threaded, Java is Java. On a low-end laptop the difference can be three times the frame rate. But Java with Sodium closes most of that gap, and Java's mod ecosystem is far larger. If your only concern is performance on weak hardware and you have not bought either yet, Bedrock is the pragmatic answer.
About the author
PC Hardware & Performance Editor
Marcus has been building, breaking and repairing gaming PCs since 2011, first as a weekend favour for friends and then for eight years as a bench technician at an independent repair shop in Portland, where roughly a third of the job was diagnosing machines that "ran fine yesterday".
Found something wrong? Games patch and fixes go stale. If a step here no longer works, tell us at hello@spyld.com and we will retest it. Read how we test and our editorial policy.