Skip to content
pop4959 edited this page Oct 5, 2024 · 56 revisions

Frequently Asked Questions

Is it possible to pre-generate faster?

Chunky is designed to run as fast as possible by default. That said, your server hardware and configuration will have a huge impact on chunk generation performance. You'll want to optimize if you want to speed things up. Here are some tips:

  • Use a faster CPU. High single threaded performance is important. For example, the Intel Core i9-13900K and AMD Ryzen 9 7950X are both excellent options. Obviously, a faster CPU will generally generate chunks faster.
  • In addition to having a fast CPU, make sure you have enough threads for your server. If not, you will be bottlenecked since Modern versions of Minecraft will use many threads for generation. With a host or VPS, these may be called logical cores, virtual CPUs (vCPUs), or similar in your plan.
  • Run the server and world from a fast SSD. Most HDDs, especially old ones, will not be able to keep up with chunk generation and saving.
  • Allocate enough memory. At least 4GB RAM is recommended. Not having enough may slow down chunk generation or even crash your server.
  • Use Aikar's flags for your server's start script. These help tune the Java garbage collector, which is important since constantly loading, generating, and unloading chunks on your server will aggressively cycle through memory.
  • Consider using Paper which supports async chunks, a custom lighting engine, and numerous other improvements which greatly improve chunk generation performance.
  • If using Paper, adjust the number of worker threads used by world generation. This is especially helpful for servers with a low number of available threads. This can be done by adding the -DPaper.WorkerThreadCount=X flag to your start script, where X is the number of threads you have. Remove the flag when you are done generating chunks. Alternatively, this can also be set in config/paper-global.yml via the worker-threads setting. Set it back to its default when done.
  • If using Fabric, try using Lithium for the general improvements to server performance it provides.

I'm experiencing degraded performance, server crashes, or server deadlocks while generating.

Oftentimes this is caused by plugins, mods, and data packs (or add-ons) that are installed. Be sure to double check that the server performs as you expect if only Chunky is installed.

Some add-ons have been commonly known to cause issues while pre-generating. Here is a list of them as well as any known workarounds or solutions:

  • C2ME: C2ME is an experimental mod that may cause various crashes due to compatibility issues with other mods. Temporarily remove C2ME if you are encountering issues while using it.
  • Dimensional Doors: There is a known issue with queued block entities that can cause a server deadlock during world gen. Remove Dimensional Doors.
  • Dimensional Threading: This mod has been known to cause numerous crashes and issues during world gen. Remove Dimensional Threading.
  • Dynmap: Rendering while pre-generating can cause performance issues. Temporarily disable rendering, or temporarily remove Dynmap and re-add it after pre-generation. Rendering afterward also tends to produce better results.
  • Dynview: "Chunk slow unload settings" can cause performance issues. Disable this option or temporarily remove Dynview and re-add after pre-generation.
  • Galosphere: There is a known issue with generation of pink salt shrines which can cause world gen to randomly stall. Use an older version of the mod or remove Galosphere.
  • Iron Spellbooks: There is an issue with the Neutral Wizard that can cause a server deadlock during world gen. Disable the mob using Bad Mobs or remove Iron Spellbooks.
  • Lootr: There is a known issue in older versions of Lootr with the tile ticker that can cause world gen to stall randomly. Update Lootr to the latest version, use the "disable" configuration option during pre-generation, or temporarily remove Lootr and re-add after pre-generation.
  • Starlight: This mod is known to cause world gen to stall randomly. Temporarily remove Starlight and re-add after pre-generation.
  • Terraform Generator: This plugin is prone to cause Watchdog crashes due to slow generation. Temporarily increase the Watchdog timeout (max-tick-time in server.properties), or disable Watchdog.

If you are still encountering issues without any add-ons installed and need some help troubleshooting, or would like to suggest a change to the above list, please join our Discord and chat with us!

Can I pre-generate a world that already exists?

Yes, and it's completely safe. Chunky will skip chunks that already exist, and generate any missing ones.

Will Chunky continue to generate chunks after the server is restarted?

Not by default, but you can toggle the continue-on-restart option in the configuration to enable this feature. You may also have to reload the configuration in-game if you change this while the server is running for it to take effect. Active tasks can be saved manually by running the pause command, and are also automatically saved when the server shuts down normally.

Why is Chunky using all of my RAM?

In most cases it isn't actually Chunky that is using all of your server memory. The chunk pre-generation process itself is very memory intensive as the server will rapidly load and unload chunks. This is fully expected, and is normally not a problem. If your server is crashing, consider increasing the amount of RAM allocated to the server, or reduce it if it's possible you may be over-allocating. Aikar's flags are also recommended which will pre-allocate the memory for you.

How much disk space will my world use?

You can use a tool like tgb's World Size Calculator to get a rough estimation for default world generation. In general, note that world size is not linear, so each small increase in radius results in a much larger overall world. The type of world generation being performed is also a factor. For example, the Minecraft version, dimension, actively used mods, etc.

Can I pre-generate a world using plugins, mods, and data packs?

Yes, most if not all custom world generation will work. This is due to the fact that Chunky doesn't directly generate the chunks itself, but instead delegates this work to the server. If there is a problem it is usually caused by a configuration issue or a problem with the custom world generation you are using. Also note that custom generation tends to be slower than Vanilla and can take much longer to pre-generate.

My custom world generation is not working!

As mentioned above, Chunky isn't directly responsible for generating the chunks. Check to make sure that any modifications are compatible with your server. Also note that modifications will only take effect after they are installed, so you may need to create a new world or generate new chunks to see their impact. Data packs in particular can be tricky, as you may need to create the world and datapacks folder to install the pack before generating the spawn.

After pre-generating there are no mobs in my world!

This is normally caused by setting the /worldborder for the world, or the max-world-size setting in server.properties being smaller than the radius selected for pre-generation. Mobs do not spawn outside of the world border. If you have already pre-generated your world, the only fix is to revert to a backup or delete the chunks and pre-generate again with the proper world border size.

Buried treasure maps are generating empty after pre-generation.

This issue is caused by MC-218156. You can fix this easily on Paper servers by setting environment.treasure-maps.find-already-discovered.loot-tables to false in the paper-world-defaults.yml configuration file, since buried treasure maps are created when the treasure chest is opened and not when they are generated.

My map isn't updating!

Maps rendered by another plugin or mod such as Dynmap, Bluemap, or Squaremap will typically not automatically update themselves after you run chunky. Sometimes you will need to trigger a re-render manually. See map rendering and trimming chunks for more details.

Trim isn't working.

A common pitfall with trim is that it cannot delete chunks that are currently being loaded by the server. This includes chunks that players have loaded or recently loaded in-game, the spawn region, or any force loaded chunks. This is because loaded chunks will be re-saved to disk when the server shuts down. Usually if you make sure chunks aren't loaded and try again it will work.