%
ISTANBUL'a taşınmamıza özel Oyun Sunucularında %10 İNDİRİM (sadece yeni müşterilere özel)
Game Servers

How to Fix Minecraft Server Lag: TPS, MSPT and spark Explained

TheCrewHost TeamUpdated: 11 min read

Quick answer

To fix Minecraft server lag, first confirm it really is server lag: if TPS falls below 20 and MSPT rises above 50 milliseconds, the main thread is overloaded; if TPS stays at 20, the problem is network latency or a player's own PC. For genuine server lag, run the spark profiler while it happens, fix whatever dominates the report, usually entities, farms, chunk generation or a plugin, then pre-generate the world and tune view distance, simulation distance and Paper's settings.

What is the difference between TPS, MSPT, FPS and ping?

TPS, MSPT, FPS and ping measure four different things, and mixing them up is the most common reason lag fixes fail. The server simulates the world in ticks and aims for 20 ticks per second, which gives each tick a budget of 50 milliseconds. MSPT, or milliseconds per tick, is how much of that budget each tick actually uses. FPS is how many frames a player's own computer draws per second, and ping is the network round trip between that player and the server.

MSPT is the number to watch, because TPS is capped at 20 and hides how close you are to the edge. A server at 20 TPS and 45 MSPT looks perfect but will stumble when a few more players join, while one at 20 TPS and 15 MSPT has plenty of headroom. On Paper, the mspt and tps commands show recent averages; on vanilla 1.20.3 and newer, tick query reports the average tick time along with percentiles.

MetricWhat it measuresHealthy valueWhat players notice when it's bad
TPSServer ticks completed per secondA steady 20Everyone at once: slow mobs and crops, delayed block breaking, rubber-banding
MSPTMilliseconds the server spends on each tickUnder 50, ideally well underNothing until it passes 50, then TPS starts falling
Client FPSFrames drawn by the player's own PCDepends on the PCOnly that player stutters, even in singleplayer
PingNetwork round trip between player and serverLow and stableThat player's hits and placed blocks register late or snap back

Is it server lag, network lag or client lag?

Start by asking who is lagging and what TPS says at that moment. If everyone lags together and TPS drops, the server is overloaded. If only one player complains while others are fine, the cause is that player's connection or computer. If everyone lags but TPS stays at 20 and MSPT is low, look at the network path, the proxy or a possible attack. The console helps too: vanilla prints Can't keep up! Is the server overloaded? when ticks fall behind, and repeated warnings rule out a pure network problem.

The table below maps the most common symptoms to their likely cause, a way to confirm it and the first fix to try. Run the check in the confirm column before you touch any settings, because a wrong diagnosis is the fastest way to break mechanics your players love without fixing the lag at all.

SymptomLikely causeHow to confirmFix
Everyone lags, mobs freeze, TPS below 20Main thread overloadedmspt above 50; spark profileFix the largest item in the spark report
Short freeze every few minutesAutosave, garbage collection or a scheduled plugin taskspark tickmonitor and spark gcSpread autosaves, size the heap properly, reschedule the task
Lag only while players exploreNew chunk generationSpikes stop in already explored areasPre-generate with Chunky and set a world border
Lag around one base or areaFarm, hopper chain, redstone clock or entity pilepaper entity list; spark profileLimit the farm, tune entity and hopper settings
Lag started after adding a pluginPlugin doing heavy work on the main threadspark report grouped by pluginUpdate, reconfigure or replace it
One player lags, others are fineThat player's connection or PCspark ping; frame rate on the F3 screenWired connection, lower render distance, client performance mods
Everyone lags but TPS stays at 20Network path, proxy or DDoSPing jumps for all players at onceCheck the proxy, contact your host's support
Crash with OutOfMemoryErrorHeap too small or a memory leakspark health --memory; spark heapsummaryFind the leak first, then add RAM if needed

How do you find the cause of lag with spark?

spark is the profiler to use: it samples what the server is doing and uploads an interactive report that you open in a browser. Paper has bundled it since 1.21, and on Fabric, NeoForge and Forge you add it as a mod. Start it while the lag is happening with spark profiler start, wait a few minutes, then run spark profiler stop to get the link, or add --timeout 300 so it stops by itself after five minutes. For short spikes, the --only-ticks-over 50 option records only the ticks that ran late.

In the report, expand the Server thread and follow the largest percentages down the tree. You will usually land in entity ticking, block entities such as hoppers, chunk loading and generation, or a plugin's or mod's event handler. spark can also group the results by plugin or mod, which points straight at the culprit. Alongside the profiler, spark tps shows TPS with tick durations, spark health adds CPU, memory and disk usage, spark tickmonitor reports sudden spikes and spark gc lists garbage collection pauses.

Old guides tell you to run timings; skip that step. Paper deprecated timings in favor of spark and turned it off by default in 1.21, and its reports were hard to read anyway. Profile during real lag, not on an empty server at four in the morning, or the report will only show you an idle server doing nothing in particular.

Which entities, farms and redstone builds cause the most lag?

Entities are the most common cause of server lag, because every mob, dropped item, minecart and armor stand is processed on the main thread. Mob farms that stockpile hundreds of animals, iron and gold farms, piles of dropped items and villager trading halls lead the list. Villagers are especially costly because their AI keeps searching for beds, workstations and paths. On Paper, the paper entity list command shows which entity types are ticking and where they are concentrated, so you can find the one chunk holding 800 chickens.

Hoppers and redstone come next. Every hopper repeatedly checks the space above it for items and containers and pushes into whatever it faces, so long hopper chains and hopper minecarts add up quickly, while redstone clocks that never stop flood the server with block updates. Fixing these is as much about house rules as settings: cap animal counts per farm, prefer water streams over long hopper lines, switch clocks off when nobody is nearby, and ban the lag machines griefers build on purpose. Settings then soften whatever remains.

Why do chunk loading and generation cause lag spikes?

Creating new terrain is one of the most expensive things a server does, so players exploring fresh land cause the sharpest lag spikes. Each new chunk needs terrain, caves, structures and lighting, and fast travel with elytra, boats on ice or ender pearls asks for many of them every second. Paper runs much of its chunk system on worker threads, but generation still competes for CPU time and pushes memory use up, and the spikes vanish as soon as players return to explored land.

The lasting fix is to pre-generate the world with Chunky while the server is empty, then set a world border just inside the generated area so nobody can create new chunks during play. Paper adds useful guard rails too: chunks.prevent-moving-into-unloaded-chunks stops players from outrunning the loader, player-max-chunk-generate-rate in the global config caps how fast one player can trigger generation, and chunks.max-auto-save-chunks-per-tick spreads autosaves out so they don't all land in the same tick.

Which Paper settings reduce lag?

Paper's settings are spread across server.properties, bukkit.yml, spigot.yml and the paper-world-defaults.yml and paper-global.yml files in the config folder, and a handful of options there do most of the work. Change one group at a time, restart, and compare MSPT before and after, because several of these settings trade a little vanilla behavior for speed and you need to know which change caused which effect. Reloading configuration on a live server is unsupported, so restart instead.

Purpur, which builds on Paper, adds more levers, such as letting villagers trapped in trading halls skip most of their AI. Whatever you change, write it down, so you can quickly undo a setting that breaks a farm your players depend on.

SettingFileWhat it doesTrade-off
view-distance 7 to 8, simulation-distance 4 to 6server.propertiesFewer chunks sent and ticked around each playerFarms and mobs farther from players stop sooner
spawn-limits and ticks-perbukkit.ymlLowers mob caps and how often spawning runsFewer mobs in the world
entity-activation-rangespigot.ymlEntities far from players tick less oftenDistant mob farms slow down
merge-radiusspigot.ymlMerges nearby dropped items and XP orbsItems visibly clump together
hopper-transfer and hopper-checkspigot.ymlHoppers move and check items less oftenSlower item sorters; some precise timings break
redstone-implementation: ALTERNATE_CURRENTpaper-world-defaults.ymlFaster redstone dust with fewer block updatesSome sensitive contraptions behave differently
alt-item-despawn-ratepaper-world-defaults.ymlDespawns junk items such as cobblestone soonerDropped junk disappears faster
optimize-explosions: truepaper-world-defaults.ymlUses a faster explosion calculationSmall differences from vanilla results
treasure-maps.enabled: falsepaper-world-defaults.ymlTurns off maps that search for distant structuresNo treasure or explorer maps for players

Which plugins cause lag, and how do you find them?

A plugin causes lag when it does heavy work on the main thread: querying a database or web API synchronously, scanning every entity or block each tick, or refreshing scoreboards and tab lists with dozens of placeholders several times a second. spark's view grouped by plugin usually names the culprit directly. If it doesn't, copy the server, remove half the plugins, test, and keep halving until the lag follows one plugin. The reload command won't give you a clean test and often leaks memory.

Some popular fixes make things worse. Lag-clearing plugins that wipe items every few minutes only mask the symptom and annoy players, while Paper's merge-radius and alt-item-despawn-rate settings do the same job quietly. Mob-stacking plugins can create load of their own, because the server keeps spawning new mobs to refill the cap, and plugins that load or unload other plugins at runtime are a reliable way to break a server. Keep plugins on builds for your exact Minecraft version and remove anything you no longer use.

How do you fix network lag and high ping?

Network lag shows up as high or jumping ping while TPS stays at 20, and the cure lies in the connection rather than the server config. The biggest factor is distance: a server close to its players starts with a shorter round trip, which is why a server in İstanbul suits players in Türkiye. Next comes each player's own setup, where Wi-Fi interference and packet loss matter more than raw bandwidth, and for home-hosted servers, the owner's upload speed.

If everyone's ping spikes at the same moment while the server itself is healthy, suspect the network path or an attack. TheCrewHost includes free DDoS protection with its game servers, and its 7/24 support team can check the network side if the pattern keeps repeating. On your end, leave network-compression-threshold at its default of 256 unless you know exactly why you are changing it. If you run a proxy, check the proxy's own load and ping as well.

When should you upgrade instead of optimizing?

Upgrade when a clean spark report shows the main thread busy with real gameplay rather than one fixable culprit. If MSPT stays high with sensible entity counts, a pre-generated world and tuned distances, you are CPU bound and need a faster core, not more memory. If the heap stays near its maximum even after garbage collection, you need more RAM or have a leak to fix first. Very large communities eventually split players across several servers behind a Velocity proxy, or move to Folia if their plugins support it.

On TheCrewHost, every Minecraft plan runs on the same AMD Ryzen 9 9950X processors and you can move to a higher plan at any time; larger plans add memory, and the top plans add more vCores. That helps Paper's background threads, but the main thread's speed stays the same. That is exactly why optimizing first pays off: the fastest tick is the one with less work to do.

Fix Minecraft server lag in 8 steps

  1. 1

    Measure first

    Run mspt and tps on Paper, or tick query on vanilla, while the lag is happening, and note the values so you can compare later.

  2. 2

    Rule out network and client

    Check whether everyone lags or only one player, and compare pings with spark ping before touching any server setting.

  3. 3

    Profile with spark

    Run spark profiler start during real lag, stop it after a few minutes with spark profiler stop and open the report link.

  4. 4

    Fix the biggest offender

    Follow the largest share of the Server thread down to a farm, entity pile, chunk generation or plugin, and deal with that first.

  5. 5

    Pre-generate the world

    Run Chunky across the playable area while the server is empty, then set a world border just inside it.

  6. 6

    Tune distances and configs

    Lower view and simulation distance, then adjust entity, hopper and redstone options in spigot.yml and Paper's world config one group at a time.

  7. 7

    Clean up plugins

    Update everything to builds for your exact version, remove unused plugins and replace any that spark shows blocking the main thread.

  8. 8

    Re-measure and decide

    Compare MSPT at peak time with your first reading; if it is still high with a clean report, upgrade the hardware.

Frequently Asked Questions

Why does my server lag even though it has plenty of RAM?

Because most lag is CPU time, not memory. The main thread has to finish each tick within 50 milliseconds, and too many entities, hoppers, redstone or chunk generation can blow through that budget no matter how much RAM is free. If spark shows high MSPT while the heap after garbage collection sits well below its limit, adding memory won't help; reducing the work per tick or moving to a faster CPU core will.

What is a good MSPT for a Minecraft server?

Anything under 50 milliseconds keeps the server at a full 20 TPS, but aim to stay well below that at your busiest hour so there is headroom for a group of explorers or a big redstone build. Occasional single spikes, for example during autosaves, are normal. Sustained values close to 50 mean the server is on the edge and the next few players will push TPS down.

What does the Can't keep up message in the console mean?

It means the server has fallen behind schedule: ticks took longer than 50 milliseconds, and the message reports how many milliseconds or ticks behind it is running. A single message after startup or a big world save is harmless. Repeated messages during normal play mean the main thread is overloaded, so profile with spark while it happens. A rare one-off can also come from a brief pause such as garbage collection.

Does Paper really reduce lag compared to vanilla?

For most servers, yes. Paper moves much of chunk loading and generation off the main thread, fixes many performance problems in vanilla code and exposes entity, hopper, redstone and spawning settings that vanilla lacks. It runs the same worlds and keeps vanilla gameplay by default, apart from a few exploit fixes such as TNT duplication, which can be re-enabled. Technical players who rely on exact vanilla mechanics should test their farms on a copy first.

Should I install a lag-clearing plugin?

Usually not as a first step. Plugins that delete dropped items or mobs on a timer hide the real cause of lag and frustrate players who lose their items. Find the actual source with spark first. If dropped items are the problem, Paper's merge-radius and alt-item-despawn-rate settings handle it with far less disruption, and entity-heavy farms are better solved with limits and house rules.

How do I fix lag on a Fabric or NeoForge modded server?

Use the same method: measure MSPT, then profile with the spark mod, which runs on Fabric, NeoForge and Forge and can group results by mod. Modded lag usually comes from large automated factories, mods with heavy world generation or chunk loaders that keep areas ticking around the clock. Pre-generating with Chunky helps just as much here, and server-side optimization mods such as Lithium on Fabric can cut tick time without changing gameplay.

Can Folia fix lag on a big server?

Only in a specific case. Folia ticks separate regions of the world in parallel, so it helps very large servers where players are spread far apart, running on machines with many cores; its developers ideally want at least 16 physical cores. Most Bukkit plugins won't load on Folia unless they are explicitly marked as supported, and players gathered in one area still share a single region. For most communities, a well-tuned Paper or Purpur server is the better choice.

Connect with our community of gamers and developers

Get instant support, share experiences, and stay updated with the latest news

Join Discord