
"My server is lagging" can mean four different problems, and the fix for each is different. Adding RAM helps one of them, and only sometimes. Changing a setting at random helps none of them. The reliable way to fix lag is to measure first, find the single biggest cause, fix that, and measure again.
This guide shows that process using spark, a free profiler that works on Paper, Spigot, Fabric, Forge and other platforms. You will learn how to tell which kind of lag you have, how to read a profiler report, and which fixes are worth doing for each cause.
Players say "lag" for very different things. Ask what exactly they see:
| What players notice | Likely cause |
|---|
| Where to look |
|---|
| Blocks reappear after breaking, mobs rubber-band, time feels slow | Server lag (low TPS) | Server CPU, plugins, entities, chunks |
| Everything is smooth but actions feel delayed, with a high ping number | Network lag | Server location, player's connection, route |
| Low FPS or stutter only on one player's screen | Client lag | The player's PC, render distance, shaders |
| Brief freezes every few seconds or minutes | Garbage collection or autosave pauses | Memory settings, world saves |
Only the first and last rows are fixed on the server. If just one player complains and their FPS is low, the server is probably fine. Our guide on why a server can lag even with 16 GB of RAM covers the memory side of the last row.
Minecraft runs the world in ticks. A healthy server runs 20 ticks per second (TPS), which means each tick has 50 milliseconds to finish all its work.
MSPT is the more useful number because it shows how close to the limit you are. A server at 20 TPS with an MSPT of 45 has almost no headroom, while one at 20 TPS with an MSPT of 15 has plenty. Watching MSPT lets you spot trouble before players feel it.
spark is available as a plugin for Paper and Spigot servers and as a mod for Fabric and Forge. Download the version for your platform from the official spark page, put it in your plugins folder (or mods folder), and restart the server. Some hosts and server software ship with spark already included, so check before installing a second copy.
After a restart, run these commands from the console or in game as an operator:
/spark tps shows current TPS and MSPT figures, plus CPU and memory usage./spark healthreport gives a quick summary of TPS, CPU, memory and disk, which is useful for a first look.Run them once while the server is quiet and once while it is busy. The difference tells you a lot already.
A profile records where the server spends its time. The key is to record it during the problem, not when everything is calm.
/spark profiler start.--timeout option to stop it automatically after a set number of seconds./spark profiler stop.spark uploads the result and gives you a link to a web viewer. Open it in your browser. You do not need to be an expert to read the top of the report.
Open the viewer and look for the server thread (often shown as the main thread). Inside it you will see a tree of methods with percentages. The principle is simple: the biggest percentage is the biggest problem.
Look for three things:
Resist the urge to fix everything on the list. Fix the top item, then profile again. The second item often shrinks on its own.
Mob farms, dropped items and animal pens are the most common source of server lag. Each loaded entity costs CPU every tick.
bukkit.yml, review spawn-limits and ticks-per to control natural mob spawning.spigot.yml, review entity-activation-range so far-away mobs tick less often.Exploring new terrain forces the server to generate chunks, which is expensive. Many players flying in different directions makes it worse.
view-distance and simulation-distance in server.properties. Both default to 10 and both are common causes of lag on small plans.Large hopper chains and redstone clocks run every tick whether anyone uses them or not.
If one plugin dominates the profile, you have options in this order: update it, change its configuration, replace it with a lighter alternative, or remove it. Do not guess. Test by disabling the suspect on a copy of the server and comparing profiles.
If the profile shows long pauses or your memory usage sits near the limit, the fix is rarely just "add more RAM." Too little memory causes frequent collections, but too much with poor settings can cause long pauses. Allocate what the server needs with some headroom, and read How Much RAM Does a Minecraft Server Actually Need for sizing.
Sometimes the server is configured well and still runs out of tick time. The main game loop depends heavily on single-core speed, so a faster processor can help more than extra RAM. Our article on why CPU performance matters explains how to judge this. If you have fixed the obvious causes and MSPT is still high at normal player counts, a stronger plan is the next step. You can compare the Budget and Premium Minecraft plans.
After each change, repeat the same test: profile under similar load and compare MSPT. If numbers improve, keep the change. If not, revert it. Changing three things at once leaves you not knowing which one worked.
Keep a simple log of what you changed and the MSPT before and after. It saves time the next time lag appears and helps you spot slow creep as the world grows.
/spark tps and /spark healthreport at quiet and busy times./spark profiler start and /spark profiler stop.For a broader list of safe improvements, see Top 15 Minecraft Server Optimisation Tips. If you are setting up a new server and want to avoid these problems from the start, our step-by-step setup guide covers the settings that matter early.
20 TPS is the target. For MSPT, anything comfortably under 50 ms keeps you at 20 TPS, and lower is better because it means you have headroom for spikes.
Only if memory is actually the bottleneck. Many lag problems come from CPU time spent on entities, chunks or plugins, and extra RAM does not help those. Profile before you upgrade.
Profilers like spark are designed to add very little overhead, so running one for a few minutes on a live server is common practice. As with any change, avoid doing it at the busiest moment if you are already at the limit.
Generating new chunks is expensive. Pre-generating the world, lowering view distance and setting a world border all reduce this.
Profile first. If MSPT is high even with sensible settings, few plugins and a normal player count, you may need a faster CPU or a bigger plan. If one plugin or one area of the world dominates the profile, it is a configuration problem you can fix yourself.
Profile when you notice lag, after adding a major plugin or farm, and after big updates. A short check every few weeks helps you catch slow decline early.
Lag is solvable when you stop guessing. Identify the type of lag, capture a profile while it happens, fix the biggest cause, and measure again. When you have tuned the server and still need more headroom, upgrading the plan becomes a decision backed by data, not hope. Ready to compare? See the current Minecraft hosting plans.

Saturday, July 18, 2026