Sale 40% off 109 products · ends Oct 15, 2026 Shop the sale

Chunky and spark: Pregenerate Your World and Find Server Lag

A practical guide for server owners: pregenerate your world with Chunky so exploring stops causing lag spikes, then use spark to find out what is still slowing your server down.

zArrowTan Resources Oct 2, 2026 6 min read
On this page
  1. Why pregenerating the world helps
  2. Install Chunky on your server
  3. Set a world border before you generate
  4. Run the pregeneration with Chunky
  5. Choose the world, center and radius by hand
  6. Start, watch and pause
  7. Repeat for the Nether and the End
  8. Keep a long generation running through restarts
  9. Find what is still lagging with spark
  10. Check whether you already have it
  11. Take a profile while the lag happens
  12. Let staff run these commands
  13. Clean up chunks outside the border

Key takeaways

5
  • Pregenerating with Chunky moves terrain generation off your live server, so exploring players cause far less lag.
  • Vanilla /worldborder set takes the full width, so a Chunky radius of 5000 matches a border of 10000.
  • Run /chunky worldborder to make the generated area match your border exactly, then /chunky start.
  • Paper 1.21 and newer bundle spark: run /spark profiler start --timeout 600 while the lag is happening.
  • Take a backup before /chunky trim, because it permanently deletes chunks.

This guide is for anyone running a Paper, Spigot or Folia server whose TPS drops when players explore, or who simply wants to know why the server stutters. By the end you will have a pregenerated world inside a world border and a spark report that points at what is still slow.

Why pregenerating the world helps

Every time a player walks into land nobody has visited, the server has to generate that terrain on the spot: shape the land, place structures, decorate the biomes. With several players flying off in different directions, that work piles up and shows as lag for everyone.

Pregenerating does that work ahead of time. Once the chunks exist on disk, the server only has to load them when a player arrives, which is far cheaper. Pair it with a world border so nobody wanders past the area you prepared, and new terrain generation mostly disappears from your live server.

Install Chunky on your server

Chunky pre-generates chunks and lets you pause, resume and track each task. It is free and open source (GPL-3.0), runs on Bukkit, Spigot, Paper, Folia, Fabric, Forge, NeoForge and Sponge, and shows over 18 million downloads on Modrinth.

Download the build that matches your server software and Minecraft version, then put it in the right folder and restart.

  1. Stop the server (type stop in the console).
  2. Upload the jar into the plugins folder, for example with scp Chunky-*.jar user@yourserver:/path/to/server/plugins/, or download it straight into plugins/.
  3. Start the server again and check the console for Chunky loading without errors.
  1. Stop the server from the Console page.
  2. Open the File Manager, go into the plugins folder and upload the jar (or use SFTP with the details on the Settings page for large files).
  3. Start the server and watch the Console for Chunky enabling.
  1. Stop the server from the main page.
  2. Open Files, then the FTP file access, and upload the jar into plugins.
  3. Start the server and check the console.

On Fabric, Forge or NeoForge the Chunky jar goes in the mods folder instead.

Set a world border before you generate

Decide how big your world should be first. Chunky works with a radius in blocks, while the vanilla /worldborder set command takes the full width. So a radius of 5,000 blocks matches a border of 10,000.

/worldborder center 0 0
/worldborder set 10000

Then tell Chunky to use that border as its selection:

/chunky world world
/chunky worldborder

/chunky worldborder copies the border's center and size into Chunky, so the generated area and the playable area line up exactly.

Run the pregeneration with Chunky

These commands work the same in the in-game chat (with permission) and in the console. On a panel, type them without the slash in the Console page.

Choose the world, center and radius by hand

If you skipped the world border step, set the area yourself:

/chunky world world
/chunky spawn
/chunky radius 5000
/chunky selection

/chunky spawn centers on the vanilla spawn point, /chunky center <x> <z> centers anywhere else, and /chunky selection shows what you are about to generate. Radius accepts suffixes such as 5k for 5,000 blocks or c to count in chunks. /chunky shape and /chunky pattern change the shape and the order chunks are generated in.

Start, watch and pause

/chunky start
/chunky progress
/chunky pause
/chunky continue

/chunky pause saves progress so /chunky continue can pick up later. /chunky cancel stops and deletes the task, but chunks already generated stay in the world.

The console prints an update every second by default. Use /chunky quiet 30 for one line every 30 seconds, or /chunky silent to toggle the messages off.

Repeat for the Nether and the End

Each dimension is its own world. Switch with /chunky world world_nether or /chunky world world_the_end (the usual folder names on Paper) and run the same steps with a radius that suits that dimension.

Keep a long generation running through restarts

Big areas can take a long time. Chunky's config.yml (in plugins/Chunky/ on Bukkit-based servers) has a few keys worth knowing:

  • continue-on-restart (default false): set to true to resume paused tasks automatically when the server starts.
  • silent (default false): hides update messages in the console.
  • update-interval (default 1): seconds between update messages.
  • force-load-existing-chunks (default false): loads chunks even when Minecraft already considers them fully generated.

Do not edit the version key, Chunky uses it to update the file. After a restart without continue-on-restart, simply run /chunky continue.

If you reset the Nether or End on a schedule, every reset brings back ungenerated terrain, so plan a fresh Chunky run after each one. Our zResetMap plugin (made by our team) schedules Nether, End or custom world resets with a fresh seed each time while keeping your spawn build in place.

Find what is still lagging with spark

Pregeneration removes one cause of lag. If TPS still drops, you need data rather than guesses, and that is what spark gives you. It is a free, open source profiler for servers, clients and proxies, with a CPU profiler, memory tools and a health report.

Check whether you already have it

According to the Paper docs, Paper has bundled spark since 1.21 and it is the preferred way to profile Paper; Timings is turned off by default there. So on Paper 1.21 or newer there is nothing to install, just run /spark tps. On Spigot or older versions, download the plugin from spark's own site! and install it like Chunky above.

If you want a newer standalone spark than the one Paper bundles, drop the jar in plugins and start Java with -Dpaper.preferSparkPlugin=true.

Add the flag before -jar in your start script, for example java -Xms4G -Xmx4G -Dpaper.preferSparkPlugin=true -jar paper.jar nogui, then restart.

Open the Startup tab and look for a field for extra Java flags or the startup command. Many hosts lock the startup command; if you cannot edit it, ask your host to add the flag for you.

Multicraft starts the server from the JAR selection set by your host, so custom Java flags usually need the host's help. Ask support to add -Dpaper.preferSparkPlugin=true.

Take a profile while the lag happens

  1. Wait until the server is busy and laggy, ideally with players online.
  2. Run /spark profiler start --timeout 600. spark stops by itself after 600 seconds and posts a link to the report.
  3. For short spikes rather than constant lag, add --only-ticks-over 100 so only slow ticks (over 100 ms) are recorded.
  4. Open the link and expand the call tree from the top, following the entries that take the biggest share of time. Plugin names in that tree tell you which one is doing the work.

Other useful commands: /spark profiler open views a running profile without stopping it, /spark profiler cancel stops without uploading, /spark health opens a live dashboard, and /spark gc shows garbage collection history.

Let staff run these commands

The base spark permission covers everything, or grant pieces such as spark.profiler, spark.health and spark.tps. Chunky uses chunky.command.<name>, for example chunky.command.start. If you manage ranks with LuckPerms, our guide on setting up LuckPerms groups and ranks shows how to give these to an admin group only.

Clean up chunks outside the border

If players explored past your new border before you set it, those far-off chunks still sit on disk. Chunky's trim command deletes chunks outside (or inside) a selection:

/chunky trim world square 0 0 5000 outside

This deletes world data permanently, so take a full backup first and stop players building out there.

Stop the server and copy the world folders, for example tar -czf backup-$(date +%F).tar.gz world world_nether world_the_end, then start again and trim.

Open the Backups tab and create a backup, wait for it to finish, then run the trim in the Console. Backup slots are set by your host plan.

Use the backup feature if your host enables it, or download the world folders through Files / FTP before trimming.

Frequently asked questions

How big a radius should I pregenerate?

Match it to the world border you want players to have. Chunky's radius is measured from the center, while /worldborder set takes the full width, so radius 5000 pairs with a 10000 border. Starting smaller saves disk space and you can extend later.

Can players stay online while Chunky runs?

Chunky does not require the server to be empty, and /chunky pause lets you stop at any time. Generation is heavy work though, so we run it when the server is closed or quiet and pause it at peak times.

What happens if the server restarts during pregeneration?

Run /chunky continue to resume the saved task. If you set continue-on-restart to true in Chunky's config.yml, paused tasks resume on their own when the server starts.

Do I need to install spark on Paper?

No. The Paper docs say Paper bundles spark starting with 1.21, so /spark commands work out of the box. On Spigot or older versions, install the spark plugin from its official site.

Does Chunky work on Folia and modded servers?

Yes. Its Modrinth page lists Folia, Paper, Spigot, Bukkit, Sponge, Fabric, Forge and NeoForge. On modded loaders the jar goes in the mods folder instead of plugins.

Share this post

Products from this post

Other plugins mentioned

Related posts

© zArrowTan Resources 2026
Forked and customised by zArrowTan · Powered by Light Store