Minecraft server lag and performance
This page helps you work out why your Minecraft Java server lags and what to change. Start with the short explainer, then find your symptom.
TPS, FPS and ping: what is the difference?
Section titled “TPS, FPS and ping: what is the difference?”Why it happens: People say “lag” for three different things, and each has a different fix.
- TPS (ticks per second) is how fast the server runs the game. A healthy server runs 20 TPS. If it drops below 20, everything slows down for everyone: mobs, crops, blocks, combat.
- FPS (frames per second) is how smooth the game looks on your own computer. The server cannot change this.
- Ping is how long messages take to travel between a player and the server. High ping affects one player at a time.
How to fix it:
- If everyone lags at once, check TPS. Type
/tpsin the Console (Paper and Purpur have it). See the sections below. - If only one player lags and TPS is 20, it is ping or their own computer. See “Lag only for one player”.
- If the game looks choppy only on your PC, lower video settings and render distance in the Minecraft client.
Can’t keep up! Is the server overloaded?
Section titled “Can’t keep up! Is the server overloaded?”Can't keep up! Is the server overloaded? Running 5000ms or 100 ticks behindWhy it happens: The server took too long to finish its work for a tick. Each tick has only 50 milliseconds. Heavy chunk loading, lots of entities, big redstone machines or a slow plugin can push it over.
How to fix it:
- Open Console and run
/tpsto see whether it is a constant problem or a one-time spike. - Run a spark profile (see “How to use the spark profiler”) while the lag is happening.
- Lower view distance and simulation distance (see below).
- Remove or reduce large mob farms, item piles and huge redstone clocks.
- If nothing helps and the server is simply busy, see “When to upgrade your plan”.
Low TPS (server runs below 20 TPS)
Section titled “Low TPS (server runs below 20 TPS)”Why it happens: The server cannot finish each tick in 50 ms. The cause is nearly always one of: too many loaded chunks, too many entities, heavy redstone, a slow plugin, or not enough CPU or memory for the size of the world and player count.
How to fix it:
- Check how many players are online and how much of the world they are exploring. New chunks cost far more than already-generated ones.
- Pre-generate the world with Chunky (see “Pre-generate the world with Chunky”).
- Lower
view-distanceandsimulation-distancein Properties. - Profile with spark and fix the top item it shows.
- Restart the server from the power bar. Long uptimes can slowly build up loaded chunks and leftover entities.
Rubber-banding (players snap back when they move)
Section titled “Rubber-banding (players snap back when they move)”Why it happens: The server is behind on its ticks, so it corrects player positions late. It can also be a bad connection for that one player.
How to fix it:
- Run
/tps. If it is below 20, treat it as low TPS and fix that first. - If TPS is fine, the player probably has packet loss or a poor connection. Ask them to try a wired connection or a different network.
- If a plugin such as an anti-cheat is enabled, it can also cause snap-backs. Check its config or temporarily disable it (see Minecraft plugin problems).
Lag when flying or exploring (chunk loading lag)
Section titled “Lag when flying or exploring (chunk loading lag)”Why it happens: Every new area has to be generated and saved, which is heavy work. Flying fast with an elytra or riding fast makes it worse.
How to fix it:
- Pre-generate the world with Chunky.
- Set a world border so players cannot wander into unlimited new terrain (see Minecraft server settings how-to).
- Lower
view-distancea little in Properties. - Ask players not to fly at top speed through ungenerated land.
Pre-generate the world with Chunky
Section titled “Pre-generate the world with Chunky”Why it happens: Generating terrain live is the most common cause of exploration lag. Chunky generates it ahead of time while nobody is playing.
How to fix it:
- Open Plugins in the panel and install Chunky (or upload the Chunky jar with Files, see Minecraft plugins).
- Restart the server if the plugin does not show up in
/plugins. - Set a world border first, for example a radius you actually need.
- In Console, run these commands one at a time (Chunky uses the default world unless you select another):
chunky radius 3000chunky start
- To pick another world or dimension, run
chunky worldand press Tab to see the names your server accepts. Progress prints in the Console. Usechunky pauseto pause andchunky continueto resume. - Do this when the server is quiet. Pre-generation uses CPU and disk space, so check your disk (see Disk full).
Pick a radius that fits your plan. A large radius creates a large world folder.
Mob and entity lag
Section titled “Mob and entity lag”Why it happens: Every mob, item, minecart, armor stand and dropped item is an entity that the server updates every tick. Thousands of them in one place slow everything down.
How to fix it:
- Profile with spark (see “How to use the spark profiler”) and look for entity work near the top.
- Find the busy area. Big animal pens, villager halls and mob farms are the usual causes.
- Cull the numbers. Keep pens small and kill extra animals.
- Make sure farms have a kill mechanism and do not fill with items.
- On Paper, you can tune spawn limits in
bukkit.ymland entity activation ranges inspigot.ymlusing Files. Change one value at a time and restart. - Use
/kill @e[type=item]to clear dropped items in an emergency. Be careful: it removes every dropped item in loaded chunks.
Too many dropped items
Section titled “Too many dropped items”Why it happens: Item entities pile up from farms, lava pits and broken chests.
How to fix it:
- Clear them with
/kill @e[type=item]in the Console. - Fix the source, such as an overflowing farm hopper.
- Ask your admins to add a plugin that clears items on a timer if you want it automatic.
Redstone and hopper lag
Section titled “Redstone and hopper lag”Why it happens: Fast clocks, long observer chains and lots of hoppers pulling items each tick are expensive. A chest wall with hundreds of hoppers can cost many milliseconds per tick.
How to fix it:
- Use spark to confirm where the time goes.
- Turn off clocks you are not using.
- Replace long hopper lines with water streams and dropper systems where you can.
- Do not leave hopper minecarts running.
- Paper has settings for hopper behaviour in its config files. Look them up in the official Paper docs before changing anything.
View distance and simulation distance
Section titled “View distance and simulation distance”Why it happens: view-distance is how many chunks around each player are sent to their game. simulation-distance is how many chunks around each player actually run (mobs move, crops grow). Each player multiplies the load.
How to fix it:
- Open Properties in the panel and search for
view-distanceandsimulation-distance. - Lower them. Lower
simulation-distancefirst: it cuts server work the most. - Save and restart the server.
- If players complain the world looks short, raise
view-distancea little but keep simulation distance low.
Vanilla defaults are 10 for both (Paper may use its own defaults). Many admins run lower values on busy servers.
Too many loaded chunks
Section titled “Too many loaded chunks”Why it happens: Chunks stay loaded around players and around chunk loaders (some farms and mods). Loaded chunks cost memory and CPU.
How to fix it:
- Lower view and simulation distance.
- Reduce spread-out players by giving them a shared hub.
- Remove chunk loaders you do not need.
- Check spark, which shows chunk and entity time.
High memory use that never drops
Section titled “High memory use that never drops”Why it happens: Java grabs memory and only frees it when it needs to. A graph that climbs and then drops in steps is normal. It only becomes a problem when it stays pinned at your limit or the server runs out of memory.
How to fix it:
- Watch memory on the panel Dashboard for a while. A sawtooth pattern is fine.
- If it hits the limit and the server crashes or restarts, see Out of memory.
- Reduce view distance, remove heavy plugins or mods, and pre-generate the world.
- If you legitimately need more memory, see “When to upgrade your plan”.
High RAM but low CPU, or high CPU but low RAM
Section titled “High RAM but low CPU, or high CPU but low RAM”Why it happens: They measure different things. Memory fills up with loaded chunks and plugin data. CPU is the work per tick. Minecraft’s main game loop uses mostly one CPU core, so a server can lag even when the CPU graph does not look full.
How to fix it:
- Do not use CPU percentage alone to judge lag. Use
/tpsand spark. - If memory is high and TPS is fine, leave it alone.
- If TPS is low, profile with spark and reduce whatever the top item is.
Lag only for one player
Section titled “Lag only for one player”Why it happens: If TPS is 20 and only one person lags, it is ping or their computer, not the server.
How to fix it:
- Ask the player to check
/pingif your software has it, or look at the ping bars in the player list. - Have them try a wired connection, close downloads or streams, and restart their router.
- Have them lower render distance in their client.
- If a VPN is on, ask them to turn it off and try again.
- If several players in the same region are affected, open a ticket with the time, their approximate location and ping numbers.
Lag spikes every few minutes (autosave)
Section titled “Lag spikes every few minutes (autosave)”Why it happens: The server saves the world on a timer. On a large world, each save can cause a short freeze.
How to fix it:
- Note if the spike happens at a regular interval.
- Lower the number of loaded chunks and entities. Less to save means a shorter freeze.
- Pre-generate the world so saves are smaller.
- Check disk space and the world size (see Disk full).
Lag spikes during backups
Section titled “Lag spikes during backups”Why it happens: Creating a backup reads and compresses your files, which can compete with the server for disk and CPU.
How to fix it:
- Open Schedules and move your backup task to a quiet time.
- Keep the world small by deleting old test worlds and unused files.
- See Backups and Schedules.
How to use the spark profiler
Section titled “How to use the spark profiler”Why it happens: Guessing is slow. spark records where the server spends its time so you can see the real cause.
How to fix it:
- Check if it is available: run
/sparkin the Console. Paper (and software built on it, such as Purpur) includes spark. If it says unknown command, install spark from the Plugins page or upload the jar with Files. - Reproduce the lag and start a profile:
/spark profiler start. - Wait one to five minutes while the lag is happening.
- Stop it:
/spark profiler stop. It prints a link to a web report. - Open the link. Basic reading:
- It is a tree of methods. Bigger and redder blocks are where time was spent.
- Expand the
Server threadfirst. - Look for a plugin name in the tree. If one plugin takes a large share, that plugin is your lag.
- Look for words like
tick entities,chunk,hopperorredstonefor world causes.
- Use
/spark healthfor a quick overview of TPS, CPU and memory./spark tpsprints TPS and CPU use. - Do not share a report publicly if it lists player names you want private.
Plugin lag
Section titled “Plugin lag”Why it happens: A badly written or misconfigured plugin can spend a lot of time each tick. Common ones are old anti-cheats, world-generation plugins and anything that scans the whole world.
How to fix it:
- Profile with spark and find the plugin in the tree.
- Update the plugin or check its config for a heavy feature to turn off.
- Temporarily disable it (see Minecraft plugin problems) and check whether TPS improves.
- Replace it with a lighter alternative if it is the problem.
Paper and other config options (high level)
Section titled “Paper and other config options (high level)”Why it happens: Paper and its forks ship performance settings that trade tiny gameplay details for speed.
How to fix it:
- Open Files. On recent Paper, look in the
configfolder forpaper-global.ymlandpaper-world-defaults.yml. Also seespigot.ymlandbukkit.yml. The newest Paper versions moved per-world settings next to each dimension’s data, so check the Paper docs for your version if you cannot find a file. - Common tuning areas: mob spawn limits, entity activation range, how often things save, and hopper behaviour.
- Change one setting at a time. Save, restart, then test.
- Read the official Paper docs for each setting before you touch it. Wrong changes can break farms and redstone.
- Take a backup first (see Backups).
Java startup flags (high level)
Section titled “Java startup flags (high level)”Why it happens: Java flags control how the Java garbage collector and memory are set up. The right flags can smooth out stutters, but most lag is not fixed by flags.
How to fix it:
- Open Startup in the panel. The startup command is editable, and there is a Reset to Egg Default button if you break it.
- Do not lower or raise the memory value beyond what your plan allows.
- If you want to use flags, copy them from a trusted source such as the PaperMC docs for your Java version, and change only the flags, not the rest of the command.
- Save and restart. If the server will not start, click Reset to Egg Default and save.
- See Startup.
Server keeps freezing or restarts when it lags
Section titled “Server keeps freezing or restarts when it lags”Why it happens: If a tick takes far too long, the server watchdog can stop it. This is a symptom of a very heavy chunk, entity or plugin problem.
How to fix it:
- Read the Console for a message such as “The server has stopped responding” with a thread dump.
- Note what was in the dump (a plugin name is a strong hint).
- Follow Keeps restarting and Out of memory.
When to upgrade your plan
Section titled “When to upgrade your plan”Why it happens: Some servers are simply bigger than the resources they have: many players, big worlds, heavy modpacks.
How to fix it:
- Do the free fixes first: lower distances, pre-generate, cut entities, remove slow plugins.
- If TPS is still low and memory sits at your limit at peak times, consider a bigger plan.
- Open the client area, go to Services, open your service and click Upgrade. Only higher plans are listed. See Upgrade.
- Not sure? Open a ticket with a spark report link and we will take a look.
Still stuck?
Section titled “Still stuck?”Open a ticket or ask on Discord. See Contact support. Include a spark report link and what you were doing when the lag happened.