Articles on: Minecraft

How to decrease lag using Chunky

For many servers experiencing lag due to a large amount of terrain being constantly generated by players, pre-generating chunks may be the solution to the problem, in order to do this, we first need Chunky installed, a Forge/Fabric mod available for Minecraft versions above 1.16.5.

Downloading Chunky

Download the proper mod version for your Minecraft Server here. If you are using Forge, download it from here.

Chunky is also available as a plugin for Spigot/Paper servers through here.

Installing Chunky

Put the downloaded .jar file into your mods folder, located at your root file directory.

File Manager

Mods / Plugins Folder


Select mods if you are using Chunky as a mod on Fabric or Forge servers, otherwise just drop it into your plugins folder.

Then start your server as usual.

Definitions and Parameters of Chunky Commands

Chunky uses various parameters to describe how the area is going to be pre-generated, they all need to be selected to Chunky properly know what to do.

For the purpose of reducing lag on your server here will be listed the following:

Note: If you want to execute the commands in-game you will need to use /

World:


chunky world <world>

Describes which world is going to be generated, for default vanilla dimensiones, the labels used by Chunky are:

world (For the Overworld)
world_nether (Nether)
world_the_end (End)


Example Usage: /chunky world world_the_end. This selects the End to be the dimension loaded.




You should see this message on the console as a confirmation.

Note: You can skip this if you want your world to be just the overworld.

Radius


chunky radius <radius>

Describes to which radius is the world going to be generated.

Example Usage: /chunky radius <3000> is going to set-up a radius of 3000, that is a 6000 block sided square, if square is selected.



Warning: This setting will impact drastically onto your server, please read our recommended Settings and Considerations

Shape


chunky shape <shape>

Describes the shape that is going to be pre-generated by the plugin.

Current shapes available for Chunky are:


Circle

Square

Triangle

Diamond

Pentagon

Star

Ellipse

Example Usage: /chunky shape circle, selects the generator shape to a circle.

Note: The red lines denotes how the radius is considered for this specific shape.
Note: You can skip this if you want your area to be a square.

Center


chunky center <x> <z>

Describes the center of the area that is going to be pre-generated, while also being the first area to be generated.

Example Usage: /chunky center 35 60, will start the generation at x=35, z=60


Note: You can skip this if you want your world to be generated with the center being 0 0.


Pregenerating the world


After selecting the world, shape, center and radius, you can do /chunky start, to start the generation process, if you wish to stop it, just do /chunky stop.

The generation process doesn’t stop or erase after server restarts, you can expect it to continue normally after every time you shut down the server.

If you really wish to kill any ongoing generation task forever, you can do /chunky cancel, which will kill any ongoing tasks on all worlds.

After turning on the pregenerator, you will begin to see messages at the console regarding the current progress and speed of the task, you can disable the notifications using /chunky silent, if you send the command again, it will re-enable them.

Recommended Settings and Considerations

While pre-generating your world(s) your server is going to be heavy-loaded, it is advised to do this while no other players are present in the world, in order for them to not experience any lag, or slow down the process.

You can set a world border so the players can’t get out of that area, thus creating new chunks and leading to lag. To select the world generation until the worldborder you can first select the world, and then do /chunky world border

The Process slowly builds up taking more RAM, if the server runs out of RAM it will crash, please be careful when generating large areas and run periodic restarts on the server to prevent this.

The Generation process can take from a couple minutes, to several hours, depending on world size and the speed of the cpu you are using, it is advised to run the tasks with at least 1 day of anticipation before players enter the server.

The world being generated will grow exponentially heavier on disk usage, this can lead to crashes in the server if the file is too big for your plan to handle, you can follow this calculation to find out approximately how much space is the world going to take up in megabytes:


For a Square Shape

For a Circle Shape

Where Radius is in blocks, as specified in the commands, and Size is in Megabytes, you can expect heavier worlds using the Square shape, as it is generating more terrain than a Circle shape, remember this is a rough estimation, the final size can vary due to the world seed used, world generator (Flat, etc.).


If you require any further assistance, please create a ticket here.


Created By: Daniel R.

Updated on: 13/12/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!