"The server is lagging" is three different diseases that share one symptom, and most lag advice fails because it prescribes without diagnosing. Spend two minutes working out which lag you have; every fix below is filed under the one it actually treats.
Step 1: which of the three lags is it?
| Lag type | What players feel | The two-minute test |
|---|---|---|
| TPS (the server itself) | Everyone affected: mobs stutter, crops stall, broken blocks pop back | Run /tick query (vanilla 1.20.3+), /tps (Paper) or /spark tps. Under 19: it's this one. |
| Ping (the network) | One or some players: rubber-banding, delayed hits, chat fine but movement janky | Check the connection bars in the player list; compare affected vs unaffected players |
| FPS (that player's device) | One player: choppy visuals even in singleplayer | F3 shows low FPS; the server can be at a perfect 20 TPS throughout |
Ping problems are fixed at the player's router, not in server.properties; FPS problems are fixed with client settings or mods like Sodium. Everything from here on treats the first kind, the only one that is genuinely the server's fault.
The settings with the biggest TPS payoff
Two lines in server.properties control most of the work your server does per tick:
view-distance=8 # chunks sent to players (10 is default) simulation-distance=6 # chunks actively ticking around each player
Simulation distance is the expensive one, because it multiplies by every online player. Dropping it from 10 to 6 cuts the ticking area around each player by roughly two thirds, and almost nobody can tell in normal play. Drop view-distance more cautiously; players do notice terrain popping in close. Change, restart, re-measure TPS, and only then touch anything else. The server.properties generator ships a performance preset with these values and explains every key.
Pre-generate the world (the exploration fix)
Creating never-visited chunks is one of the heaviest things a server does, which is why lag spikes track exactly with someone rocketing across the map. Generate the terrain once, up front, with the Chunky plugin (or its Fabric/Forge mod build), then fence the world so nobody outruns the pre-generated area:
chunky radius 3000 chunky start # and once it finishes: worldborder set 6000
Run it overnight; generation is intense while it runs. Afterward, exploration costs almost nothing, because loading a saved chunk is cheap and creating one never happens again.
Entities: the usual suspect list
When TPS sags on a mature world, it is nearly always accumulated entities: the 40-villager breeder, hopper chains ticking item checks, a mob switch nobody remembers, item farms overflowing on the ground. /spark profiler (from the free spark plugin/mod) names the offender instead of making you guess: run it for a minute, open the report link, and the heaviest chunks and entity types are listed with percentages. Two cheap mitigations while you negotiate with the farm owner: /gamerule maxEntityCramming 8, and on Paper, lower hopper.check-interval style entity settings in the config it documents.
Run Paper instead of vanilla
If you run plugins anyway, Paper is the same game with years of performance work applied: smarter chunk handling, entity activation ranges (distant mobs tick less), and per-world tunables vanilla doesn't expose. Same worlds, same players, routinely several TPS better under load. On SpawnFort it is the Paper option in the version picker; switching keeps your world.
RAM: enough, not more
Too little RAM shows up as rhythmic GC stutter, not as slowly sagging TPS: the server freezes for a beat every few seconds while it frantically collects garbage. Size by workload: 2 to 4 GB vanilla, 4 GB with a plugin suite, 8 GB and up for kitchen-sink modpacks; the RAM calculator maps player counts and mods to a number. Past "enough", more RAM fixes nothing.
When it's not you: the host's share
Minecraft's main loop is single-threaded, so what a server actually buys is one fast CPU core that is really yours. Budget hosts oversell: many servers share the same cores, and your TPS falls when a neighbor's modpack boots, which no setting of yours can fix. The tell: your spark reports look clean, entity counts are sane, and lag still comes and goes by time of day. If that describes your current server, the fix is a host that reserves capacity instead of renting the same core five times.