Applies to: Minecraft Java Edition server 26.3 (Java 25); Paper and Chunky according to their documentation
First find out whether the server is lagging or only your connection. Run /tick query as an operator: if it says the game can’t keep up with the target tick rate, the server is overloaded. The usual fixes are a lower simulation-distance, a pre-generated world, Paper instead of the vanilla server, and finding the farm or plugin that eats the most time with a profiler.
1. Server lag or connection lag?
- Everyone lags at the same time: mobs move in jumps and blocks you break reappear for all players. That is server lag.
- Only you lag and other players are fine: the problem is between you and the server, or your own PC. Test the path from your computer to the server’s IP with ping or MTR, try a cable instead of Wi-Fi, and pause downloads. A low frame rate with smooth movement is your PC: lower your own video settings.
2. Measure the server
A Minecraft server runs at a target of 20 ticks per second, so every tick has 50 ms. When ticks take longer, the whole game slows down. Three tools are built in (from the server console, or in game as an operator):
/tick queryprints a status line, either The game is running normally or The game is running, but can’t keep up with the target tick rate, followed by the target tick rate, the average time per tick against the 50 ms target, and P50, P95 and P99 tick times.- The console log shows
Can't keep up! Is the server overloaded? Running ...ms or ... ticks behindwhen the server falls behind. /perf startrecords a 10-second profile and saves a debug report;/jfr startand/jfr stoprecord a Java Flight Recorder file for deeper analysis.
On Paper, the spark profiler is built in (since 1.21, according to PaperMC): /spark profiler start --timeout 600 records ten minutes and gives you a link to a report that shows which plugin, entity type or chunk uses the time. Run it while the lag is happening.
3. Tune server.properties
Stop the server, change these lines in server.properties, then start it again. The 26.3 defaults are shown:
view-distance=10 simulation-distance=10 max-players=20
- simulation-distance is the one to lower first, for example to 6. Mojang’s changelog for this setting says entities are not updated outside the simulation distance, which “allows higher render distance with less CPU load”.
- view-distance sets how far, in chunks, the server sends terrain to players. A lower value, such as 8, means fewer chunks to load and send, but players see less far.
- max-players: each player keeps their own area of the world loaded, so more players need more CPU.
4. Pre-generate the world
Generating new chunks is expensive, and every player who explores new land makes the server generate terrain. Pre-generate an area before players join with the Chunky plugin or mod (it supports Paper, Fabric and NeoForge, among others). From its documentation:
chunky radius 5000 chunky start
Then set a world border of the same size with /worldborder, so nobody travels beyond the generated area. Chunky’s authors suggest starting with a radius of 5000, because large worlds take a long time and a lot of disk space.
5. Switch to Paper and check plugins
Paper is a drop-in replacement for the vanilla server with many performance fixes, and it runs Bukkit and Spigot plugins. See Minecraft server software compared. If you already use plugins or mods, the profiler usually points at one; otherwise remove them one at a time.
6. Memory and Java
- Minecraft 26.3 needs Java 25 (Mojang’s version data lists Java 25 for it).
- Set the start and maximum memory to the same value (
-Xms4G -Xmx4G), and leave 1 to 1.5 GB of the server’s RAM for the operating system. PaperMC gives the same advice. More in give Minecraft more RAM.
7. Common in-game causes
- Large mob farms and piles of dropped items: every entity is updated every tick inside the simulation distance.
- Redstone contraptions that never switch off.
- Players in spectator mode flying around: the game rule
spectators_generate_chunksdecides whether they load new terrain. Set it with/gamerule spectators_generate_chunks false.
More commands in Minecraft server commands. A Minecraft VPS from Ucartz includes DDoS protection, and we install Vanilla or Paper for free on request.