Pre-generating chunks for a smoother Minecraft server
You know the moment: someone straps fireworks to their elytra, flies off towards the horizon and the whole server starts stuttering. That's no coincidence. Generating new terrain is one of the heaviest things your Minecraft server does, and by default it happens at the worst possible time: while players are online.
Pre-generating flips that around. You let the server build the world in advance at a time you choose, so exploring afterwards comes down to loading ready-made chunks instead of inventing them on the spot. It costs you some storage and a night of number-crunching, but it saves you lag spikes at every busy moment after that.
Why new chunks are so heavy
A chunk is a 16-by-16-block column that the server generates one at a time. A lot goes into it: calculating terrain shapes, carving out caves, placing structures, scattering trees and ore, and computing lighting. One chunk is manageable, but an exploring player requests dozens at once — and with fireworks under an elytra, easily hundreds per minute.
Modern server software like Paper moves part of that work to separate threads, but computation is still computation: at a busy moment you'll notice chunk generation as stutters, rubber-banding or dropping TPS. And without countermeasures it stays that way, because every new player heading in a different direction opens up fresh terrain again.
Not sure whether chunk generation is really your culprit? Measure it first with the spark profiler; the knowledge base article on spark explains how to read such a report. Lag more often has multiple causes than just one.
First a world border, then generate
Pre-generating without a boundary is mopping with the tap running: a Minecraft world is practically infinite, so you first have to decide how big it is allowed to get. You do that with the built-in world border:
/worldborder center 0 0puts the centre of the border at the world origin (use your spawn's coordinates if it's somewhere else)./worldborder set 10000makes the world 10,000 blocks wide.
Watch out for the classic gotcha: the number after set is the diameter, not the radius. A border of 10,000 therefore means 5,000 blocks from the centre to the edge. Pre-generation aside, a border like this is a good idea anyway: it keeps your world and your backups manageable and keeps players reasonably close together.
Do this before your community builds all over the place, and announce it. Shrinking a border afterwards leaves player bases outside the boundary — and surprises like that cost you goodwill. Making it bigger, on the other hand, is always painless.
How to pre-generate with Chunky
Chunky is the standard choice for this job: free, actively maintained and available as both a plugin and a mod. The basics are a handful of commands:
- Make a full backup of your world first.
chunky worldborder— Chunky automatically takes the area inside your world border as its selection.chunky start— generation begins and progress appears in the console periodically.chunky pauseandchunky continue— you can pause and resume at any time, even after a restart; Chunky remembers where it left off.
The server stays online while generating, but expect noticeably worse performance as long as it's running. So plan it for quiet hours, and feel free to pause when there are lots of players on in the evening. How long it takes depends on your radius and the CPU your server runs on: from an hour or so for a small world to a full night or longer for a big one.
Good to know: you don't have to finish this in one go. Let Chunky run for a few hours every night and pause it during the day; after a few days your world is just as done. And if you run a generation again later, Chunky simply skips everything that already exists — it never does the same work twice.
How much should you pre-generate?
More isn't automatically better. First look at how your players actually use the world: on most servers, nearly everyone plays within a few thousand blocks of spawn, with the occasional explorer as the exception. A few guidelines:
- Small survival server with friends: a border of 5,000 to 10,000 blocks is plenty to play in for months.
- Public server: plan more generously, say a border of 10,000 to 20,000, depending on how many explorers you expect.
- The Nether: don't forget it, especially if players build long travel tunnels there. Thanks to the 1-to-8 scale, the Nether border only needs to be one eighth of your overworld border.
- The End: usually the least urgent; many servers skip pre-generating here or keep it small.
Rather generate a modest area you expand later than a gigantic world in one go “just in case”. Expanding is easy: enlarge the border and run Chunky again — it skips existing chunks automatically. If you also want to reduce the load of loaded chunks in the meantime, look at your view distance; the guide to server.properties explains which settings matter there.
What it costs: storage and other downsides
Let's be honest, pre-generating has a price. The main points at a glance:
- Storage: every generated chunk sits on disk, even if no one ever visits it. For an overworld of 10,000 by 10,000 blocks you're quickly looking at multiple gigabytes, depending on the terrain. And it adds up fast: doubling the radius means four times as many chunks.
- Backups: these grow and slow down proportionally. So check how much storage your plan includes before choosing an enormous radius.
- Outdated chunks: generated chunks keep the terrain of the Minecraft version they were created with. If an update introduces new biomes or structures, you'll only see them in fresh terrain. Many servers deliberately enlarge the border after such an update, so the new terrain appears beyond it.
- No miracle cure: pre-generating only avoids the cost of generating. Lag from farms, entities or heavy plugins in existing areas doesn't go anywhere.
A server that can handle it
Pre-generating leans mostly on CPU and storage, and afterwards every player benefits from the result. At MC-Node your server runs on our own hardware with NVMe storage in the Previder data centre in Hengelo, with DDoS protection included — and it's exactly that fast storage that helps load all those ready-made chunks quickly. A selection of the plans:
| Plan | Price per month |
|---|---|
| Cobblestone | €0.50 |
| Coal | €2.20 |
| Iron | €3.30 |
| Redstone | €5.50 |
| Diamond | €7.70 |
| Diamond - Premium | €17.50 |
All plans can be cancelled monthly, so you can start small and scale up as your world and player count grow. The full range is in the MC-Node Minecraft store. Set your border, let Chunky grind away for a night, and nobody will notice the next elytra trip on the TPS.