How to Optimize a Modded Minecraft Server (Stop the Lag)
Updated July 28, 2026
To rid a modded Minecraft server of lag, work in this order: measure first with Spark to identify what is eating tick time, drop simulation-distance to 4-6 and view-distance to 6-8 in server.properties, pre-generate the world with Chunky, install the server performance mods (Lithium, C2ME, FerriteCore), then hunt down the gameplay culprits — oversized mob farms, hopper carpets, dropped items, forgotten chunk loaders. If MSPT still sits above 50 ms after all that, the problem is the hardware or the hosting plan.
This guide walks through the whole method, in the order that pays off most. The guiding principle: never optimize blind. A modded server can lag for ten different reasons, and every tweak has a cost — lowering distances at random or piling on mods without measuring often trades away comfort without winning back a single millisecond of tick time.
First, understand: TPS, MSPT and the two families of lag
The server aims for 20 ticks per second (TPS), one tick every 50 ms. MSPT (milliseconds per tick) measures how long each tick actually takes: as long as it stays under 50 ms, the server holds 20 TPS and all is well. TPS is therefore a late indicator — it only drops once the budget is blown — while MSPT shows the remaining headroom: a server at 20 TPS with 45 ms MSPT is one mob farm away from collapse. On Forge and NeoForge, /forge tps gives a first per-dimension overview; Spark does much better.
Also separate server lag from everything else: if mobs freeze and mined blocks reappear, it is the server tick (this guide). If your frame rate stutters while the world runs normally, it is the client — see our performance mods guide. If your actions respond late while TPS is fine, it is the network or the player’s connection.
Diagnose with Spark, step by step
Spark (Fabric, Forge, NeoForge, Paper) is the reference profiler: it records what the server actually does for a few minutes and produces a readable report in the browser. Here is the full procedure.
- 1
Install Spark on the server
Download the Spark build matching your loader from Modrinth, drop it into the server’s mods folder and restart. The commands require operator permissions.
- 2
Record TPS and MSPT
Run /spark tps: it prints average TPS and MSPT over several time windows. A median MSPT under 35 ms is comfortable; above 50 ms, the server is falling behind. Write these numbers down — they are your baseline.
- 3
Run a profile under load
At peak hours — lag is diagnosed while it happens — run /spark profiler start --timeout 300: the profiler records for five minutes, stops on its own and prints a link to the report.
- 4
Read the report
Open the link in a browser and expand the call tree following the highest percentages. Look at which dimension, then which system (entities, block entities, chunk generation) dominates, and above all which mod shows up in the method names: that is your likely culprit.
- 5
Cross-check server health
/spark health summarizes memory, garbage collection time and CPU load. Frequent GC pauses point to a RAM or Java flags problem; a single CPU core pinned at 100 percent means the hardware is the ceiling.
- 6
Fix one thing, measure again
Apply a single fix — a setting, a mod, dismantling a farm — then run another profile under the same conditions. It is the only way to know what actually worked.
The server.properties settings that actually matter
Two lines outweigh everything else. view-distance sets the radius of chunks sent to players: 6 to 8 is plenty on a modded server (default 10); beyond that, memory and bandwidth costs climb fast. simulation-distance sets the radius where the server keeps the world alive — entities, crops, machines: this is the one that costs tick time. Set it to 4-6; below 4, mob farms and some redstone contraptions stop working, so warn your players.
The winning combination for most modded servers: view-distance=7, simulation-distance=5. Players see far, the server only simulates what is near. Round it out with sync-chunk-writes=false (asynchronous chunk saving, a real gain on slow disks) and, if your pack allows it, slightly lower mob spawn caps in the relevant mod configs. Validate every changed setting with the next Spark profile.
Pre-generate the world with Chunky
Chunk generation is the most expensive job on a young modded server: every exploration trip triggers biomes, structures and ores from dozens of mods at once. The fix is to pay that cost up front, with no players online. Chunky (Fabric, Forge, NeoForge, Paper) handles it: /chunky radius 3000 then /chunky start pre-generates a 3,000-block radius around spawn — expect several hours depending on pack and machine, ideally overnight or before launch day.
Pair it with a world border (/chunky border, or your pack’s WorldBorder mod) at the same radius: without a limit, the first player who sets off with an elytra will recreate generation lag forever and balloon the save file. Pre-generate the Nether too (an eighth of the radius covers the same logical area), and widen the border later if the population grows.
Install the server performance mod stack
With the settings in place, performance mods win back the rest: Lithium trims every tick, C2ME parallelizes chunks, Krypton streamlines networking, FerriteCore cuts memory, ModernFix fixes and speeds up. All of them are server-side only — your players install nothing — and available on both Fabric and NeoForge in 2026.
The detailed list — each mod’s role, exact loaders, legacy Forge equivalents and compatibility traps — has its own dedicated guide on performance mods, linked at the bottom of the page. Keep the golden rule: add mods one at a time and validate each with a Spark profile, because two mods touching the same system can cancel each other out or crash.
Hunting the gameplay causes
On a modded server that has been running for months, lag rarely comes from the tech stack: it comes from what players built. The Spark report will tell you which of these families dominates on your map.
- Oversized mob farms: hundreds of living entities pathfinding around the clock. Enforce automatic kill mechanisms and reasonable per-player caps.
- Hopper carpets: every hopper checks its inventory every tick. Replace hopper lines with the pipes, belts or conduits from your tech mods — incomparably cheaper.
- Dropped items: an overflowing farm or an unclaimed death leaves thousands of item entities. Shorten their lifetime in the configs or run a periodic clear-lag mod.
- Forgotten chunk loaders: every force-loaded area is simulated continuously, player present or not. Audit chunk loaders regularly and cap them per player.
- Block entities in bulk: thousands of active machines, chests and cables weigh on the tick even when idle. Encourage compact factories — a few fast machines rather than hundreds of slow ones.
- A forgotten dimension: Spark’s per-dimension breakdown sometimes reveals that a mining world or a mod dimension concentrates the lag — usually a farm or chunk loader nobody thought to look for there.
When it is the hardware or the host, and how to tell
If, after settings, pre-generation, mods and a full cleanup, MSPT stays high and the Spark profile shows no obvious culprit, the server simply lacks power. Minecraft’s main tick loop is still single-threaded: what matters is per-core CPU performance, not core count. A heavy pack (400+ mods) wants a recent high-frequency CPU, 8 to 12 GB of RAM dedicated to the server and NVMe storage — and be wary of shared hosting plans sold by the gigabyte: RAM never substitutes for CPU.
Watch out for the opposite reflex too: over-allocating RAM lengthens garbage collector pauses and creates a telltale periodic stutter. Allocation guidelines and the right Java flags (ZGC or G1 depending on heap size) are covered in our dedicated guides, linked below. Finally, if /spark health shows network spikes or noisy neighbors on a shared plan, moving to a dedicated server or a well-specced VPS fixes what no mod can.
Mods & Tools Mentioned
- Spark ↗ — The reference profiler for TPS and MSPT — Fabric, Forge, NeoForge, Paper
- Spark documentation ↗ — Official guide to the profiler’s commands and report reading
- Chunky ↗ — World pre-generation and border — Fabric, Forge, NeoForge, Paper
- Lithium ↗ — Server-side game logic optimization — Fabric and NeoForge (official)
- FerriteCore ↗ — Cuts memory usage — Fabric, Forge, NeoForge
- Community server optimization guide ↗ — Exhaustive, community-maintained reference for server settings
Frequently Asked Questions
› What is the difference between TPS and MSPT?
TPS counts ticks executed per second (20 at most); MSPT measures how long each tick really takes. TPS only drops once MSPT exceeds 50 ms, so watch MSPT — it shows the headroom left before the crash. A healthy server stays under 35 ms at peak hours.
› My server shows 20 TPS but players still complain about lag. Why?
Because the lag is not necessarily server-side. If the world runs normally but rendering stutters, it is the client (client performance mods); if actions respond late, it is the network or the player’s connection. A Spark profile will show nothing in either case — which is precisely the clue.
› Which view-distance and simulation-distance should I pick?
For most modded servers: view-distance between 6 and 8, simulation-distance between 4 and 6 — 7 and 5, for example. Do not push simulation below 4: mob farms and some redstone circuits would stop working. View can stay higher than simulation at no tick cost.
› How much RAM does a lag-free modded server need?
6 to 8 GB for an average pack, 10 to 12 GB for heavyweights like All The Mods. Beyond what is needed, extra RAM improves nothing and even lengthens garbage collector pauses. If MSPT is high with memory to spare, the bottleneck is the CPU, not RAM — see our allocation guide.
› Is there a Paper equivalent for modded servers?
Not really: Paper does not load Forge, NeoForge or Fabric mods, and hybrid mods-plus-plugins projects have a long history of incompatibilities. The safe route in 2026 is a native Fabric or NeoForge server with the performance mod stack — Lithium, C2ME, Krypton — which recreates most of Paper’s gains.
› How often should I restart the server?
A scheduled daily restart remains good hygiene on a heavy pack: some mods leak memory and performance degrades slowly. But if your server needs several restarts a day to stay playable, that is a symptom of a real problem — profile with Spark instead of restarting harder.
Read Next
Ready to play? Find an active server in the rankings.
See the rankings