Skip to main content

How to optimize your Minecraft server

Level: Advanced


In this guide, we will provide you with some options on how to optimize your Minecraft server for the best performance. This is an advanced guide, so we assume you have basic knowledge of Minecraft and UltraServers UI.

How To Optimize Your Minecraft Server

Minecraft's features are extremely customisable and allow you to get your game options completely suited to your liking. This guide will give you some options of things you can do to try and ensure smoother gameplay for you and all the players on your server.

Map pregeneration

  • Due to different chunk generation improvements made over the years, servers with poor, single-threaded, or constrained CPUs are the only ones that can benefit from map pre-generation. To produce chunks for world-map plugins like Pl3xMap or Dynmap, pre-generation is frequently employed. If you still want to pre-generate the world, you can use a plugin such as Chunky

server.properties settings

  • view-distance: This is the distance in chunks that will be sent to players, similar to no-tick-view-distance from Paper. A good starting value is 7.
  • Higher view distances can create unnecessary lag on your server and on your client.

Client side FPS

  • Having a low frame rate on your server doesn't always mean that the server is lagging. Sometimes your computer can struggle to keep up with all the generation or Mods running in your game. If you do have a consistent low frame rate on your PC, you will most likely need to adjust your game settings, update your drivers, or upgrade the graphics card, RAM, or CPU.

  • You can run optimization Mods such as Optifine or use an optimization mod from an external launcher (Prism, ATLauncher). There are Modpacks such as Fabulously Optimized that can help your game to run a lot smoother by adding some frame rate and shader optimization options.

Server side lag

  • MSTP: You may find out how long the server takes to compute recent ticks using Paper's /mspt command. Server side lag is measured in ticks. If your ticks drop below 20 OR become really high such as 50 you may be experiencing lag. This is where diagnostic tools and plugins should be used to help you determine the problem (see below).

Timings reports

  • If the MSTP values are higher than expected (over 50), it suggests that your server might be lagging, you can use Spark to see detailed information. Spark is a plugin that allows you to profile your server's CPU and memory usage. You can read this guide for a detailed usage of the plugin.

Connection Lag

  • If you're experiencing connection lag, it's probably because your ping is high. Ping is just a fancy term for the time it takes for data to travel between your game and the server. The longer it takes, the higher your ping. And if your ping is too high, you might get kicked out of the server or even crash the game.
  • To avoid this, you want your ping to be as low as possible. That means less latency and smoother gameplay. But sometimes your ping can be affected by things like how far away the server is from you, the speed of your internet, or even your firewall settings.
  • To get the best ping possible, try moving your server closer to you and your players. That way, you can minimize lag and avoid any annoying connection issues. This can be done by choosing the server location closest to you, and you can do ping tests to different locations here

spigot.yml settings

  • hopper-transfer: Time in ticks that hoppers will wait to move an item. Increasing this will help improve performance if there are a lot of hoppers on your server, but will break hopper-based clocks and possibly item sorting systems if set too high. A Good starting value is 8
  • hopper-check: Ticks between hopper checks for an item in the inventory or above them. If your server has a lot of hoppers, raising this value will improve performance, but it will disrupt water stream- and hopper-based item sorting systems and clocks. A good starting value is 8
  • merge-radius: This decides the distance between the items and exp orbs to be merged, reducing the amount of items ticking on the ground.

Good starting values:

  item: 3.5
  exp: 4.0

Paper world config settings

  • Anti-xray: Enable this to hide ores from x-rayers. For detailed configuration of this feature, check out this guide. Enabling this will actually decrease performance, however it is much more efficient than any anti-xray plugin. In most cases, the performance impact will be negligible. Good starting value: true
  • nether-ceiling-void-damage-height: If this option is greater than 0, players above the set y level will be damaged as if they were in the void. This will prevent players from using the nether roof. Good starting value: 127
  • alt-item-despawn-rate: This list lets you set an alternative time (in ticks) to despawn certain types of dropped items faster or slower than default. This option can be used instead of item clearing plugins along with merge-radius to improve performance.
Good starting values:

      enabled: true
      items:
        cobblestone: 300
        netherrack: 300
        sand: 300
        red_sand: 300
        gravel: 300
        dirt: 300
        grass: 300
        pumpkin: 300
        melon_slice: 300
        kelp: 300
        bamboo: 300
        sugar_cane: 300
        twisting_vines: 300
        weeping_vines: 300
        oak_leaves: 300
        spruce_leaves: 300
        birch_leaves: 300
        jungle_leaves: 300
        acacia_leaves: 300
        dark_oak_leaves: 300
        mangrove_leaves: 300
        cactus: 300
        diorite: 300
        granite: 300
        andesite: 300
        scaffolding: 600

Don't use plugins without research

  • It is very important to note that just because a plugin has a lot of downloads, it does NOT make it safe to use. You should always do your own research on plugins before adding them to your server. UltraServers is not responsible for any lost data or corruption of server due to unsafe plugin use.
  • For example: Plugins removing ground items: They are completely useless because merge-radius and alt-item-despawn-rate can take their place. When compared to not deleting anything at all, they often spend more energy searching and eliminating things.
  • You can have a look at how to install plugins through this guide

Plugins enabling/disabling other plugins

  • It is good to keep your plugins' usage "clean" so to say. Any plugins that throw errors or seem to affect your server in the wrong way should be removed as soon as possible.
  • You don't need to run duplicate plugins, for example running a plugin like Luckperms and Mypermissions at the same time can cause some clashes that will cause one or both of them to not run properly. So you should be choosing one permissions plugin, not both.
  • As well as learning how to optimize your plugin installations by removing any plugins throwing errors or causing version clashes here

Removing Tick/Lag machines

  • Redstone is an awesome way to build just about any kind of machine you can imagine. But, if you go overboard and build too many machines, you'll start having problems. Your TPS will go down, and everyone will start experiencing some lag. To fix this, you should limit the number of machines you build, and consider installing anti-redstone-lag plugins.
  • Also, try not to build too many automated farms, mob grinders, or anything else that uses a lot of complex redstone. And, whenever possible, make sure you have a way to turn off your machines and farms, so they're not running all the time and eating up all your resources.

How Minecraft utilizes RAM

When running a Minecraft server, particularly one that's using Java, you might notice that a high percentage of your RAM is being used. However, it's important to understand that unused RAM in Minecraft is essentially wasted RAM. Here's why:

Java works on the principle of 'use memory as needed but keep it for later use'. When Java launches a program, it reserves a chunk of your computer's RAM for its own use. As the program needs more memory, Java expands its usage up to the maximum that's been allowed. The key point here is that once Java has taken RAM, it generally doesn't give it back to the operating system even if it's not actively using it at the time. Instead, it keeps that RAM on hand for future needs.

In this sense, if your Minecraft server is using 99% of your allotted RAM and isn't experiencing any issues like lag or crashes, then it's functioning as intended. Minecraft (and Java in general) is designed to use up the RAM it's given to improve performance. Unused RAM is just potential that's not being utilized.


If you are having trouble with this, you can open a support ticket here!
Feedback and suggestions regarding this article are welcome in our Discord server.