Back to Blog

Minecraft Server Lag: Low TPS and How to Fix It

Why does your Minecraft server lag? TPS and MSPT, measuring with spark, chunk generation, view distance, entities, plugins and the fix with Aikar's flags.

Nodesty Team6 min readGame servers
The words Minecraft Lag with TPS, MSPT and spark on a dark Nodesty background

Minecraft server lag almost always comes down to the same problem: the server tries to update the world (tick) 20 times a second, and it has to finish each tick within 50 milliseconds. When it can't, TPS (ticks per second) drops below 20; blocks break late, mobs stutter and players teleport around. The good news is that once you measure with the right tool, you can usually find the cause of the lag in a few minutes and fix it with a few settings.

This guide covers the types of lag, how to measure TPS and MSPT, finding the bottleneck with spark and fixes for the most common causes of lag. If you haven't set up your server yet, start with our How to make a Minecraft server guide.

Three types of lag

What players call "lag" can come from three different problems:

TypeSymptomCheck
Server lagEveryone stutters at the same time, blocks break lateTPS and MSPT
Network lagSome players teleport around while others play fineThe players' ping
Client lagThe screen stutters, but the server and other players are fineThe player's FPS

Classifying the problem correctly keeps you from looking for a fix in the wrong place. If all players stutter at the same time, the problem is most likely on the server. If only certain players stutter, look at their connection; we explain the causes of ping and latency in our What is ping? article.

What are TPS and MSPT?

  • TPS (ticks per second): How many ticks the server processes per second. The target is 20; it never goes above 20 TPS.
  • MSPT (milliseconds per tick): How many milliseconds a tick takes. Under 50 ms is healthy; every tick over 50 means TPS drops.

MSPT warns you earlier than TPS: if TPS shows 20 but MSPT has climbed to 45 ms, the server is at its limit and lag will start when a few more players join. On Paper servers, you can measure them in the console or in game with these commands:

/tps
/mspt

Find the bottleneck with spark

Measure instead of guessing. spark is a free profiler that shows where the server spends its time. It comes built in with recent versions of Paper; if it doesn't, you can install it as a plugin.

/spark tps
/spark health
/spark profiler start

Start the profiler while the server is lagging, wait a few minutes and stop it:

/spark profiler stop

spark gives you a link. In this report, a tree view shows which plugin, which world or which job (chunk generation, entities, redstone) the tick time goes to. The sections below are fixes for the causes that most often stand out in the report.

1. Chunk generation

When players enter areas no one has visited before, the server generates the world on the fly. This is one of the heaviest jobs in Minecraft and the most common cause of sudden lag during exploration.

The fix is to pre-generate the world and set a world border. With the Chunky plugin:

/chunky radius 5000
/chunky start

This command generates the area within a 5,000-block radius of the center before players get there. It can take a long time; start it at an hour when few players are online. Then set a world border so players don't go outside this area:

/worldborder set 10000

2. View and simulation distance

Two settings in the server.properties file decide how much area the server loads and processes for each player:

view-distance=8
simulation-distance=6
  • view-distance: The chunk distance sent to players. Higher values increase RAM and network usage.
  • simulation-distance: The distance within which mobs, crops and redstone run. It directly decides the processor load.

For most servers, a view-distance of 8–10 and a simulation-distance of 6–8 is a good balance. Paper also has separate settings that let players see farther without straining the server.

3. Entities: mob farms and items

Every tick, the server processes all entities (mobs, animals, items on the ground, minecarts, armor stands). If entities stand out in the spark report:

  • Limit large mob farms or steer players toward more efficient designs.
  • Clear items piling up on the ground; farms that collect junk and the items of players who died build up over time.
  • Use the entity and item merging settings in Paper's world settings (paper-world-defaults.yml).
  • If there's a problem in a specific area, the /spark profiler report and the warnings in the console lead you to the right chunk.

4. Plugins

A single plugin that's badly written or runs every tick for no reason can slow down the whole server. If a plugin takes a big share in the spark report:

  • Update the plugin; performance problems are often fixed in new versions.
  • Review its settings; turn off timers that run frequently and features you don't need.
  • Look for a lighter alternative, or remove it if you don't really need it.

5. Server software

Vanilla server software isn't optimized for performance. Paper, and Purpur, which is built on top of it, keep most of the vanilla gameplay while performing much better and supporting plugins. If you're still using vanilla or Spigot, switching to Paper alone can make a big difference; back up your world before switching.

6. RAM and Java settings

If there isn't enough RAM, the server runs garbage collection often and stutters; more RAM than needed can also lead to long pauses. The recommended approach:

  • Set -Xms and -Xmx to the same value.
  • Leave 1–1.5 GB for the operating system.
  • Use Aikar's flags, which Paper recommends; they tune the G1 garbage collector for Minecraft:
java -Xms10G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 \
  -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch \
  -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M \
  -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 \
  -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 \
  -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem \
  -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs \
  -Daikars.new.flags=true -jar paper.jar --nogui

Change 10G to match your server's RAM. Paper's documentation also gives the current version of the flags, with small differences for large memory values. You can find how much RAM you need in the table on our Minecraft server page.

7. Processor

Minecraft's main loop runs largely on a single core. Even if total processor usage looks low, TPS drops when that core is maxed out. That's why single-core speed matters more than the number of cores. If MSPT is still high after all the optimizations, moving to a processor with a higher clock speed is the most effective fix. We cover checking the server's overall resource usage in our Why is my server slow? article.

Quick checklist

  1. Confirm the problem is on the server with /tps and /mspt.
  2. Take a report with /spark profiler while the lag is happening.
  3. Pre-generate the world with Chunky and set a world border.
  4. Balance the view-distance and simulation-distance values.
  5. Check the entity count and heavy plugins.
  6. Use Paper and start it with Aikar's flags.
  7. Restart the server regularly; we cover automating this in our What is cron? article.

Nodesty for your Minecraft server

Nodesty Minecraft server hosting plans run in Frankfurt with a Ryzen 9 9950X processor reaching 5.7 GHz for Minecraft's single-core main loop, NVMe storage for world saves and L3–L7 DDoS protection. The plans include free daily backups kept for 7 days, and when your player count grows, you can move up to a bigger plan from the panel.

Minecraft is a trademark of Mojang AB. Nodesty is not affiliated with or endorsed by Mojang or Microsoft.

Frequently Asked Questions

What should my TPS be?

A Minecraft server aims for 20 ticks per second; if TPS is 20, the server is running smoothly. Values between 18 and 19 are small fluctuations most players won't notice. When TPS drops below 15, blocks break late, mobs stutter and players feel the delay.

Will giving the server more RAM fix lag?

Not always. Most stuttering in Minecraft happens because the processor can't finish a tick within 50 milliseconds; adding RAM doesn't help in that case. Giving it more RAM than it needs can also make garbage collection pauses longer. Measure the bottleneck with spark first, then set the RAM based on what you measure.

My ping is low, but the game still stutters. Why?

Ping shows network latency, while server lag is about how fast the server processes the world. If TPS is low, the game stutters no matter how good your ping is. On the other hand, if TPS is 20 and you still get stuttering, the problem may be your computer's FPS or your connection.

Should I use Paper or vanilla?

Even if you don't use plugins, Paper performs much better than a vanilla server and keeps most of the vanilla gameplay. Technical redstone and some mechanics that rely on game bugs can behave differently on Paper; if you have that kind of community, review Paper's related settings.

Does pre-generating the world really make a difference?

Yes. When players travel to new areas, the server generates chunks on the fly, and that's one of the heaviest jobs it does. Pre-generating the area players will explore with Chunky and setting a world border largely eliminates stuttering during exploration.

Do mob farms slow down the server?

Large mob farms, items piling up on the ground and lots of animals increase the number of entities the server has to process every tick. If entities stand out in the spark report, limit the farms, clear item piles and use Paper's entity settings.

Nodesty

About the author

Nodesty Team · Infrastructure & Support

The Nodesty team runs our servers, network and DDoS protection day to day and answers customer support requests around the clock. These guides come from that work.

Related articles

Launch your server now.

Build, scale, and conquer without limits on Nodesty's premium infrastructure.

                                                                                                                                                                                                                            
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            
                                                                                                                             ············································                                                   
                                                ··································································································..........···························                                     
                                       ················..........................................................................................................................··············                             
                                  ·············.................::::::::::::::::::::::::::::::::::::::::::::::....................:::::::::::::::::::::::::::::::::::::::................···········                        
                             ············................:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::............·········                     
                         ············.................:::::::::::::::::::::::::::::::::::::::::::::::::::------------::::::::::::::::::::::::::::::----------------:::::::::::::::::::::..........········                  
                    ············......................::::::::::::::::::::::::::::::::::::------------------------------------------------------------------------------------:::::::::::::.........········                
                ··········.............................................::::::::::::::::::-------------==========================================-----------------------------------:::::::::::........·······               
             ········..................:.....................................::::::::::--------=======+++++++++++++++++++++++++++++++++++++=========================------------------::::::::::.......·······              
           ······.........::::::::::::::::::::................................:::::::-----=====++++xxxxxx**************************xxxxxxxxx++++++++++++++===================------------::::::::.......·······             
          ·····.......:::::::::::::::::::::::::::.............................:::::----===+++xxx****%%%%&&&&&&#############&&&&&&&%%%%%*******xxxxxxxx++++++++++++++==============----------:::::::......······             
         ····......::::::::-------------:::::::::::..........................::::---===+++xx***%%%&&&####@@@@@@@@@@@@@@@@@@@@@@@@####&&&&&%%%%*******xxxxxxxxx+++++++++++++===========--------::::::......·····             
        ····.....:::::::--------------------:::::::::.......................::::---===++xxx**%%&&&###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###&&&&%%%%%********xxxxxxxxxxx++++++++++++========------::::::.....······            
        ····.....:::::--------------------------::::::::....................::::---===++xx***%%&&&####@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###&&&&&%%%%%**********xxxxxxxxxxxxx+++++++++=======------:::::.....·····            
        ····....::::::-------=============---------:::::::::................:::::---===+++xx***%%%&&&#####@@@@@@@@@@@@@@@@@@@@@@@@@#####&&&&&%%%%%%*************xxxxxxxxxxxxxx+++++++++======-----:::::....·····            
         ····....:::::-------================---------:::::::::...............:::::----===++++xxx***%%%%&&&&&&#################&&&&&&%%%%%%%*******************xxxxxxxxxxxxxxxxx++++++++======----:::::....·····            
         ·····....:::::--------=================---------::::::::::..............:::::::-----====+++++xxxxxx**************************xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++++=====-----::::....·····            
          ·····.....:::::--------=================----------:::::::::::.................:::::::::-------=============++++++++++++++++++++++++++++++++++++xxxxxxxxxxxxxxxxxxxxxxx++++++++======-----::::....·····            
            ·····.....:::::::----------===========-------------::::::::::::.........................::::::::::::::::::------------------=============+++++++++++++++++++++++++++++++++=======-----::::.....·····            
              ······......:::::::---------------------------------:::::::::::::........................................:::::::::::::::-----------============+++++++++++++++++++++========------:::::.....·····             
                 ······........:::::::::---------------------------:::::::::::::::::...........................................:::::::::::::------------=============================--------::::::.....······              
                    ·········.........:::::::::::::::-------------::::::::::::::::::::::::.......................................::::::::::::::::--------------------------------------::::::::......·······                
                          ··········............::::::::::::::::::::::::::::::::::::::::::::::::::................................::::::::::::::::::::::::::-------------:::::::::::::::.........········                   
                                  ············..................:::::::::::::::::::::::::::::::::::::::::::.........................:::::::::::::::::::::::::::::::::::::................···········                        
                                             ················.............................................................................................................·················                                 
                                                           ······················................................................................···························                                                
                                                                               ·········································································