Optimize a Minecraft server: diagnose and reduce lag
This guide explains how to tell TPS, MSPT, FPS and ping apart, measure with spark, then reduce lag on a Minecraft Java server: Paper, distances, pre-generation, entities, memory and restarts.
By Salem ASSADI • Published 5 November 2026 • Updated 25 November 2026 • Related plan: Minecraft server
Why a Minecraft server "lags": identify the problem first
"The server is lagging" is the most common complaint on a Minecraft Java server, and the vaguest: that word covers very different problems. Before touching the configuration, tell four indicators apart:
- TPS (ticks per second): the server computes the world in "ticks", at most 20 times per second. At 20 TPS, all is well. Below that, the game slows down for everyone: mobs freeze, broken blocks reappear, furnaces run slowly.
- MSPT (milliseconds per tick): the actual time the server takes to compute one tick. To hold 20 TPS, each tick must take less than 50 ms. This is the most precise indicator: a server at 45 MSPT still shows 20 TPS but has almost no headroom left.
- Client FPS: how smooth the picture is on the player's PC. Low FPS comes from the player's machine (graphics card, shaders, render distance), not from the server.
- Ping (network latency): the round-trip time between the player and the server. High ping causes delayed actions and rubber-banding even when the server runs perfectly at 20 TPS.
This guide explains how to optimize a Minecraft server to reduce server-side lag: measure with /tps and spark, switch to Paper or Purpur, tune the distances, pre-generate the world, limit entities, size Java memory correctly and schedule restarts. The examples are based on the RXCORP Minecraft server plan and its Pelican panel, but the method applies to any Java server.
Prerequisites
- A Minecraft Java server, ideally running Paper or Purpur (step 2).
- Access to the panel.rxcorp.me panel: Console, Files, Schedules, Backups and Startup.
- Operator (op) rights on the server to run the diagnostic commands. On the panel, Players page: "OP" button on the player's row, with the server running.
Step 1: measure before changing anything
On Paper and its forks, two commands give a first picture of the server's health:
/tps
/mspt
/tps shows the average TPS over the last 1, 5 and 15 minutes. /mspt shows the computation time of recent ticks. Write these values down while the lag is actually being felt, not on an empty server.
The spark profiler
spark is the go-to tool for understanding what is consuming tick time. It is built into recent versions of Paper; on an older version or other server software, install it as a plugin or mod. The useful commands:
/spark health
/spark tps
/spark profiler start
/spark profiler stop
/spark health summarizes TPS, MSPT, CPU usage, memory and disk space. The profiler records the server's activity: start it during a period of lag (a few minutes is enough), then stop it. spark returns a link to a web report showing, as a tree, the share of each task: chunk generation, entities, tile entities (hoppers, furnaces) and, above all, each plugin. That report should guide your tuning, not guesswork.
Step 2: use Paper or Purpur instead of vanilla
Mojang's vanilla server is not built for performance. Paper is server software compatible with Bukkit/Spigot plugins that includes many optimizations (chunk loading, entities, redstone) and extra tuning options. Purpur is based on Paper and mainly adds gameplay options; its performance is comparable.
On RXCORP, Paper, Purpur, Fabric, Forge and NeoForge can be installed from the panel's Versions page ("Software catalog", "Install" button). For a plugin server, Paper is the default choice. For a modded server, optimization is done with mods on Fabric or NeoForge: see the guide set up a modded Minecraft server with Fabric or NeoForge.
world_nether, world_the_end), so going back requires moving files around.Step 3: tune view-distance and simulation-distance
These are the two settings with the biggest impact. They live in server.properties, at the server root (Files page), and on the panel's Configuration page, Performance tab, as "View Distance" and "Simulation Distance":
view-distance=8
simulation-distance=6
view-distance: radius, in chunks, of the chunks sent to players. It mainly increases memory use, loading and bandwidth.simulation-distance: radius, in chunks, in which the world is actually simulated (mobs, crops, redstone). This is the most CPU-expensive setting.
The default is 10 for both. Lowering simulation-distance to 6 or 5 noticeably relieves the CPU while keeping visible scenery thanks to view-distance. The values above are a starting point, to be adjusted according to player count and spark results. Restart the server to apply them.

Step 4: adjust Paper's configuration files
Paper adds its own files in the config/ folder: paper-global.yml for global settings and paper-world-defaults.yml for settings applied to every world (a paper-world.yml file in a world's folder can override them). A few options commonly used in paper-world-defaults.yml:
entities.spawning.despawn-ranges: distances at which mobs despawn. Lowering them limits the number of mobs loaded around players.chunks.entity-per-chunk-save-limit: caps, per type, the entities saved per chunk (arrows, experience orbs, snowballs…). Useful against overloaded chunks that cause lag when loaded.collisions.max-entity-collisions: maximum number of collisions computed per entity per tick. Lowering it helps with very dense mob farms.misc.redstone-implementation: lets you pick a faster redstone implementation than vanilla's. It can change the behavior of some technical builds; test before enabling it on an advanced redstone server.
The exact names and locations of options change from one Paper version to the next. Before any change, check the key in the official Paper documentation, change one thing at a time and measure again with spark.
Step 5: pre-generate the world with Chunky
Generating new chunks is one of the heaviest operations for a server. When several players explore at once, especially with elytras, the server spends its time generating terrain and TPS collapses. The fix is to generate the map in advance with the Chunky plugin (or mod):
/chunky world world
/chunky center 0 0
/chunky radius 5000
/chunky start
This example generates a square with a 5,000-block radius around 0 0 in the world world. /chunky pause and /chunky continue let you pause and resume. Run pre-generation on an empty server, preferably at night, then cap the world size with a border (/worldborder set 10000 sets a border 10,000 blocks wide, i.e. a 5,000-block radius around the center).
Pre-generation uses disk space: on the Starter plan (15 GB SSD), keep the radius reasonable.
Step 6: limit entities and farms
In most spark reports from survival servers, entities come out on top: herds of hundreds of animals, mob farms, dropped items, villagers. A few simple rules:
- Set a per-pen animal limit in the server rules and enforce it.
- Villagers are expensive (pathfinding, looking for beds and workstations): prefer compact trading halls where they cannot move.
- Hoppers and redstone clocks that run constantly consume tick time even with no player nearby, as long as the chunk is loaded.
Step 7: spot resource-hungry plugins
In the spark report, expand the server's main thread: plugins appear by name in the call tree. A plugin that constantly takes a significant share of tick time deserves to be updated, reconfigured or replaced with a lighter alternative.
On the panel, the Minecraft Plugins page lists what is installed ("Installed" tab): you can update or uninstall a plugin there. The "Install latest version" button picks the latest stable version.
Step 8: size Java memory correctly
A common reflex is to give all available RAM to the server. That is a mistake: the Java virtual machine needs memory outside the heap for its own operation, and an oversized heap lengthens garbage collector (GC) pauses with no real gain. On a containerized server such as those run by Pelican, exceeding the container's memory limit gets the process stopped. So leave a margin between the memory allocated to the heap (-Xmx) and the plan's RAM.
Aikar's flags are a set of JVM options, popularized by the Paper community, that tune the G1 garbage collector to shorten pauses on a Minecraft server. They are published in the Paper documentation. On RXCORP, the startup command is visible in the Startup tab; depending on the server configuration, some options can be adjusted there. If in doubt, ask support rather than editing the command blindly.
Sizing guidelines: the Starter plan (2 GB RAM, 1 vCPU Intel Core i7-8700K) suits a small Paper server among friends; Standard (4 GB, 2 vCPUs) a community with several plugins; Performance (8 GB, 3 vCPUs) busier servers or modpacks. Keep in mind that a Minecraft server runs most of its simulation on a single thread: past a certain point, adding RAM does not fix a TPS problem.
Step 9: schedule restarts
A regular restart, for example daily at an off-peak time, frees memory and unloads accumulated chunks. On the panel's Schedules page:
- Create a schedule at the desired time (for example minute
0, hour5). - Task 1: "Send Command",
say Restarting in 5 minutes. - Task 2 (offset 300 s): "Send Command",
save-all. - Task 3 (offset 30 s): "Create Backup" (optional).
- Task 4 (offset 30 s): "Send Power Action", Restart action.
Troubleshooting
TPS drops when players explore
This is almost always chunk generation. The spark report confirms it (world generation tasks at the top). Fix: pre-generate with Chunky (step 5) and set a world border.
A lag spike every X minutes
Regular, periodic lag points to autosave (every 5 minutes by default in vanilla) or to garbage collector pauses. /spark health and the profiler show GC activity. Check that a backup plugin or a scheduled task does not run at that moment, and that the allocated memory is appropriate (step 8).
High ping but 20 TPS
If /tps shows 20 and MSPT is low, the server is not at fault: the problem is on the network, often between the player and their internet provider (Wi-Fi, saturated connection, VPN). Have another player test, and check status.rxcorp.me for network status. RXCORP's permanent DDoS filtering requires no configuration on your side.
Conclusion
Optimizing a Minecraft server starts with measuring: tell TPS, MSPT, FPS and ping apart, then let spark point to the culprit. The clearest gains then come from Paper or Purpur, a reasonable simulation-distance, pre-generating the world and discipline around entities. To host your server with one-click Paper, Purpur, Fabric, Forge or NeoForge, no commitment and delivered within a few minutes, see the RXCORP Minecraft server plan (from €2.99 per month). Support answers on Discord and by ticket. More tutorials are available in the guides section.