// lag guide
Fix "Can't keep up! Is the server overloaded?" on a modded server
This warning isn't a crash. It means the server fell more than two seconds behind the game's clock and gave up on the time it lost. One now and then is harmless. A steady stream is lag your players feel: rubber-banding, slow machines, mobs that freeze in place. Here's how to measure it and find what's using up each tick.
What the warning looks like
It shows up in the console and in logs/latest.log. On vanilla and Fabric:
[14:02:11] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2019ms or 40 ticks behind
Forge and NeoForge add the logger's name in brackets, so the same line can look like either of these:
[Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 7946ms or 158 ticks behind
[Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 3078ms or 61 ticks behind
The two numbers say the same thing in different units: how far behind schedule the server was when it gave up catching up. 158 ticks is about 8 seconds of game time that never happened.
Minecraft 1.12.2 and older, including GregTech: New Horizons on 1.7.10, word it differently:
Can't keep up! Did the system time change, or is the server overloaded? Running 4962ms behind, skipping 99 tick(s)
What it means: the 50 ms tick budget
Minecraft runs the world in ticks, 20 a second. Every tick the server moves mobs, runs machines and redstone, grows crops, loads and saves chunks, and handles players. To keep up, each tick has to finish within 50 milliseconds.
When ticks take longer, the server falls behind. On modern versions, once it's more than two seconds (40 ticks) behind, it logs this warning and skips ahead instead of trying to run the missed ticks. It warns at most once every 15 seconds, so one line can stand for a lot of lag.
Two numbers describe how a server is doing:
- TPS (ticks per second) tops out at 20. Below 20, the game is visibly running slow.
- MSPT (milliseconds per tick) is how long each tick actually takes. TPS stays at 20 until MSPT goes over 50, so MSPT is the number that shows how close you are to the edge. A server at 45 MSPT is still at 20 TPS but has almost no headroom left.
Occasional or constant?
- A few lines at startup, or when someone flies into new terrain: usually normal. Loading the world and generating new chunks are some of the heaviest work a server does.
- A line every 15 seconds or so, for minutes at a time: the server can't handle what's loaded. Something needs fixing.
- Huge numbers, tens of seconds, followed by a freeze: if a single tick ever takes 60 seconds, the watchdog kills the server. That's the watchdog crash guide.
Measure it with spark
spark is a free profiler mod for Forge, NeoForge and Fabric. It only needs to be on the server, and some packs (All the Mods 10, for example) already include it. Run these from the console, or in game as an op:
/spark tps
TPS from last 5s, 10s, 1m, 5m, 15m:
Tick durations (min/med/95%ile/max ms) from last 10s, 1m:
CPU usage from last 10s, 1m, 15m:
Under each heading spark prints the numbers. The tick durations line is MSPT. Read it like this:
- Median well under 50: the server is fine on average.
- Median under 50 but max in the hundreds: lag spikes. Something heavy runs now and then: chunk generation, a farm, garbage collection, an autosave.
- Median over 50: constant overload. TPS drops below 20 and the warnings keep coming.
/spark profiler
/spark profiler start --timeout 300
This records what the server thread spends its time on for 5 minutes (300 seconds), then posts a link to spark's web viewer. Run it while players are on and lag is happening. To catch only the bad moments, add --only-ticks-over 100 so spark records just the ticks that took longer than 100 ms. Without --timeout, stop it yourself with /spark profiler stop.
In the viewer, open the Server thread entry and keep expanding the biggest percentages. You'll pass through Minecraft's own steps (ticking entities, ticking block entities, chunk work) down to the code doing the work. Mods show up by their package name, like com.simibubi.create for Create. Anyone with the viewer link can open it, so think before you post it in public.
Other quick checks
/spark gcshows garbage collector statistics: how many collections each collector has run and how long they take on average. Long or frequent pauses point to memory, not the CPU.- Forge has
/forge tpsand NeoForge has/neoforge tps, built in, with mean tick time and TPS for each dimension. /forge entity list(or/neoforge entity list) counts entities by type in the current dimension. Add a type in quotes, like/forge entity list "minecraft:item", to see the ten chunks with the most of them. The quotes are needed because of the colon.
Common causes and what to do
World generation
Making new chunks is some of the heaviest work a server does, and big packs add a lot of world generation. Players exploring in different directions at once can bring a strong server to its knees. Fix it by generating the world ahead of time with Chunky, a free mod for Forge, NeoForge and Fabric. While nobody is online:
chunky center 0 0
chunky radius 3000
chunky start
That generates everything within 3,000 blocks of 0, 0. Then worldborder set 6000 keeps players inside the generated area. Pre-generating is heavy while it runs, so expect warnings until it finishes. chunky pause and chunky continue let you split it up.
Entities: dropped items, farms and mobs
Every loaded mob, animal, dropped item, minecart and arrow is updated every tick. A mob farm with no kill system, a breeding pen with hundreds of cows, or a machine spitting items onto the ground adds up fast. Count them (see above), then fix the source. To clear dropped items now, kill @e[type=minecraft:item] removes every dropped item in loaded chunks. Warn players first, because it takes their dropped items too.
Machines, pipes and storage
Machines, pipes, hoppers and storage blocks are block entities, and most of them do work every tick. Huge pipe networks, long hopper chains and very large storage systems are common sources. The profiler names the mod. Check that mod's config for limits or tick-rate settings, and split large setups up instead of running everything in one place.
Chunk loaders and force-loaded chunks
A force-loaded chunk ticks all the time, even when nobody is near it. That's the point of a chunk loader, but forgotten ones add up. forceload query lists the vanilla force-loaded chunks in the current dimension. Mod chunk loaders keep their own list. FTB Chunks, for example, lets each player force-load claimed chunks. Its server settings are in config/ftbchunks-world.snbt: max_force_loaded_chunks (25 per player by default) and force_load_mode, where NEVER allows force-loading only while at least one member of the owning team is online. A pack update can overwrite that file, so put your changed copy in world/serverconfig/, where it overrides the pack's version.
Create contraptions and trains
Create's moving contraptions, trains and big kinetic networks run on the main server thread like everything else. If the profiler shows com.simibubi.create near the top, look at the biggest builds first: contraptions that never stop, trains on long routes, very large rotation networks.
Memory and garbage collection
When Java's memory is nearly full, it spends more and more time on garbage collection, and the long pauses show up as lag spikes. If /spark gc shows long pauses and memory sits near the top in the panel, the server needs more RAM or a lighter pack: see out of memory. The reverse doesn't work, though. Once the server has enough memory, more RAM doesn't make ticks faster. Tick time is CPU work. How much RAM a modded server needs covers sizing.
Single-thread CPU speed
The world is ticked on one main thread, the Server thread you see in the log. Extra cores help with side jobs like generating chunks, but the speed of one core sets how much work fits into each 50 ms tick. If the profiler shows the time spread across many normal things, and nothing stands out, the pack has outgrown the CPU. The answer is a faster CPU, fewer active players in one place, or a lighter pack.
View and simulation distance
In server.properties, simulation-distance (1.18 and newer, default 10) sets how many chunks around each player are ticked. Going from 10 to 8 cuts that area from 21 × 21 to 17 × 17 chunks per player, about a third less. view-distance controls how far players can see and how many chunks the server sends and keeps loaded. Lower it too if memory is tight. Restart after changing either one.
Notes for big packs
Common in these packs: All the Mods 10 (around 500 mods), FTB StoneBlock 4 (388 on the server) and GregTech: New Horizons. Big packs give players more machines, farms and world generation to fill each tick with, and a long-running world on one only gets heavier.
All the Mods 10
All the Mods 10 runs around 500 mods on NeoForge 1.21.1, so it has more of everything above: world generation, machines and items. It already includes spark, so /spark tps and the profiler work without installing anything. Pre-generate before players spread out. It also includes FTB Chunks, so check force-loaded claims with the settings above. All the Mods' own lag guide covers the item clearing in Crash Utilities, which ATM10 also includes. If you run the Aeronautics Edition of ATM10, read the Create Aeronautics note below too.
GregTech: New Horizons
GregTech: New Horizons runs on Minecraft 1.7.10. spark isn't part of the pack, but it ships Opis, a profiler for 1.7.10. As an op, type /opis in game to open its window. From the server console, opis_start runs a short profile. When it's done, opis_te lists the 20 slowest block entities and opis_ent lists the slowest entities. GregTech bases grow into a lot of machines, so on a long-running server, start with the biggest factories.
Create Aeronautics
Create Aeronautics (NeoForge 1.21.1) builds flying and driving vehicles on Sable, a physics library mod. Each assembled vehicle is a physics-simulated structure Sable calls a sub-level. Two things to know for a server:
- Sable's server config,
config/sable-server.toml(a copy inworld/serverconfig/overrides it), hassub_level_substeps_per_tick, default2. Sable's own description warns that higher values are significantly more performance intensive. Leave it at the default. /sable forceload query(op only) lists the force-loaded sub-levels in your current dimension and what keeps each one loaded. Force-loaded vehicles stay loaded with nobody nearby./sable forceload removetakes off one that was added by command.
In the profiler, Sable shows up as dev.ryanhcode.sable and Create as com.simibubi.create.
How to check it's fixed
- With players on, run
/spark tpsa few times over an evening. The median tick duration should stay well under 50 ms. - Search
logs/latest.logforCan't keep upafter a normal play session. A few at startup are fine; a steady run of them isn't. - If you changed a config, run the profiler again and check the mod you fixed has dropped down the list.
Related guides
Modded hosting is relaunching.
Tick time depends mostly on the speed of one CPU core, so we pick hardware for clock speed, not core count. The relaunch hardware isn't final yet, and we'll say exactly what it is before ordering opens. We're moving DSN Servers to new hardware, and ordering is closed until then. Join the launch list and we'll email you when servers open.