# Optimize minecraft servers

## 1. Plugins to install

* [UltimateStacker](https://marketplace.songoda.com/marketplace/product/ultimatestacker-the-simple-to-use-stacker.16) (Optimize items and mobs)
* [Chunky](https://www.spigotmc.org/resources/chunky.81534/) (For the pre generation section)
* [Spark](https://spark.lucko.me/download) (Server monitoring)

## 2. Pre-Generate Chunks

If you have not already install the [Chunky](https://www.spigotmc.org/resources/chunky.81534/) plugin, After installing the plugin you can use the following commands to set where is starts generating from and how far you want it to go!

```
/chunky center 0 0
/chunky radius {How far out to generate}
/chunky start
```

After running these commands you should see it start to generate chunks in console! Now you just have to wait for it to finish.

## 3. How to use spark

You can use spark to see what processes are using the most resources on your server. To get it to start tracking run the following command:

```
/spark profiler --only-ticks-over 150
```

You will have to wait about 2 minutes for it to gather data, When its done run this next command to get a link to a dashboard that will tell you about your servers processes!

```
/spark profiler open
```

On this page you can see many things such as plugins and possesses using resources! Now use the information to start optimizing for example lets say I see mob spawning is using a lot but its a mini game server that does not need mobs, You could start by disabing mob spawning to fix that issue, Be creative and you can fix many issues! Dont know what to do? Ask in our discord for some help!

## 4. Config your files

This is one of the most important parts of making your server run faster. For this you will edit your `server.properties`, `bukkit.yml`, `spigot.yml`, and your paper config files. You can find a guide of what to change and other ways to optimize [here](https://www.paper-chan.moe/paper-optimization/).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.solarhosting.cc/minecraft-help/optimize-minecraft-servers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
