JoinGG

Pre-generating a Minecraft world, and why it helps

Terrain generation is the most expensive thing your server does, at the worst moment. How far out to go, and the border you want anyway.

SweetMask · 5 min read

Terrain generation is the most expensive thing a Minecraft server ever does, and it happens at the worst possible moment: when a player walks somewhere new. Pre-generating moves that work to a time when nobody is waiting.

What is actually slow

Minecraft stores the world as chunks, generated on demand. When a player approaches unexplored terrain the server has to produce it — landscape, caves, structures, ores, mobs — and it does that on the main thread, which is the same thread running everything else.

The result is the stutter every survival server knows: somebody sprints into new territory and the whole server hitches. Not the player who moved. Everyone.

This is why a new world feels worse than an old one, and why a server that ran fine for a month degrades the week a new player decides to explore in a straight line.

What pre-generation does

It generates the chunks in advance, deliberately, while the server is empty or quiet. Then when a player walks there the chunks are already on disk and the server only has to load them, which is cheap.

The tools are plugins or mods — Chunky is the common one on Paper and Fabric — and the command is roughly "generate a square of radius N around this point, and tell me when you are done".

The work does not disappear. It is moved from prime time to a moment you chose.

How far out to go

This is the decision that matters, because pre-generating is not free in disk.

RadiusChunksRough disk
2,000 blocks~15,700200–400 MB
5,000 blocks~98,0001.5–3 GB
10,000 blocks~392,0006–12 GB
20,000 blocks~1,570,00025–50 GB

Those figures vary a great deal with world type and version, and modded worlds run far higher. Treat them as an order of magnitude rather than a budget.

For most survival servers, 5,000 blocks is a sensible first target. It gives players a large area to explore without the frontier hitch, and it is small enough to regenerate if you change your mind about the world.

Going to 20,000 on a server with thirty players is buying disk for terrain nobody will visit. Explored area does not scale with world size; it scales with how many people are exploring and for how long.

The border, and why you want one

Pre-generation pairs naturally with a world border. Generate to a radius, set the border there, and the server never generates terrain in play at all.

That has consequences beyond performance. A bounded world concentrates players, which makes a small population feel less lonely — the single most useful thing you can do for a server that is quiet rather than dying. An infinite world with fifteen players is fifteen people who never meet.

It also caps disk growth permanently, which turns storage from an unknown into a number.

Doing it without breaking anything

Do it on an empty server. Pre-generation saturates the CPU by design. Running it with players connected is the same stutter you were trying to prevent, sustained for hours.

Do it in chunks of time, not one long run. Most tools support pausing and resuming. A run that takes six hours is better as three two-hour runs overnight than one attempt that has to complete.

Watch the disk, not the progress bar. The failure mode is running out of space partway, which leaves a world in a state that is fine but incomplete and a server that will not start until you free something.

Do it before you open, if you can. Pre-generating a live server means finding hours when nobody is on, and a successful server does not have many of those. This is one of the few pieces of server setup that is dramatically easier on day zero.

What it does not fix

Pre-generation removes generation lag. It does nothing about:

If your server stutters when nobody is moving, generation was never the problem and pre-generating will not help.

The way to tell them apart: generation lag correlates with somebody travelling. Watch when the hitches happen. If they follow a player heading somewhere new, pre-generate. If they happen on a Saturday evening with everyone in the same base, look elsewhere.

It is also the kind of job that belongs on a schedule rather than in your memory if you intend to extend the border later.

Backups get bigger

A pre-generated world is a larger world on disk, and that goes straight into every backup you take. A 3 GB world backed up daily with thirty days retention is 90 GB of storage unless your backups are incremental.

This is worth arranging before pre-generating rather than after, because the first time it matters is the first time a backup fails silently for lack of space — and backups fail quietly by nature.

For modded servers

Everything above is more extreme. Modded terrain generation is often several times slower than vanilla, the chunks are larger on disk, and some mods generate structures that are expensive in ways vanilla ones are not.

It is also where pre-generation pays most, because the stutter is proportionally worse. If you run a modpack and have never pre-generated, it is likely the single largest performance improvement available to you — and it costs nothing but time and disk.

The version caveat matters here too: generation changes between versions, so a pre-generated world does not extend cleanly into new terrain after a major update. That seam is the same one behind why seeds are version-specific.

The short version

Generation is the most expensive thing your server does and it happens while people are waiting. Move it to a time you chose, pick a radius matched to your actual population rather than your ambitions, pair it with a border, and check the disk before you start.

Five thousand blocks, generated overnight before you open, is the version of this advice that fits almost every server. Twenty thousand is terrain you are paying to store and nobody will see.

Tags
minecraftserver adminhosting
Share

SweetMask

Published · 5 min read

All articles

Keep reading

Guides · Minecraft

Paper configuration beyond server.properties

Three more files hold the settings that decide whether a busy server runs well. Which entries matter, and which ones hide a problem.

· 4 min read
Guides · Minecraft

When a Minecraft proxy is the wrong answer

Velocity and BungeeCord solve one problem and bring three. The honest threshold for needing a proxy, and what it never fixes.

· 3 min read