Reducing Lag

Jan 13, 2020
Reducing Lag
  • Reducing Server Lag

    A basic guide

    This is a list of settings that you can change to try to boost your server performance by a bit. This page also includes some recommendations of settings that might reduce "lag" in certain cases.

    It is best to figure out the cause of your performance issues first and then to modify these settings according to the cause and to not just take all these values and put them into your config files!

    This can be done by taking a look at Spigot's Timings to get an overview of what is using the most of your server performance.

    These settings are going to give you biggest boost out of the lot. So give them a try and see how it goes!

    These settings specify how close items on the ground have to be before they will merge. You can get away with setting it to:
    Code (Text):
          item: 4
          exp: 6


    This is how long in ticks that dropped items will stay on the ground. If you have a lot of entities loaded (/gc with essentials) then try lowering this to 1200 which is 1 minute. Keep in mind that players may not be able to recover their items if keep-inventory is off.
    Code (Text):
        item-despawn-rate: 1200


    This is one of the biggest factors in server lag. This is like the render distance for your server. All players on your server will be limited to this viewing distance. Now try experimenting with this option, a good place to start if you're having lag is:
    Code (Text):
        view-distance: 4


    This is basically how close in blocks you have to be before mobs/animals will react. Now lowering this does have some cons, as mobs will not "see" you from a long distance but if you really need the boost try setting it to the bare minimum:
    Code (Text):
          animals: 8
          monsters: 10
          misc: 2

    The amount of ticks between the server checking if there are items in hoppers and moving the items. Try these settings anyways:
    Code (Text):
          hopper-transfer: 24
          hopper-check: 24
    hopper-amount: 3

    This is the maximum amount of TNT that can explode in 1 tick. If you are having trouble with players using too much TNT and lagging your server, then try limiting it to 10:
    Code (Text):
        max-tnt-per-tick: 10

    (note to self: I need to make this more noob friendly)
    According to the spigot.yml wiki "The time - in ms - that (tile) entity operations can consume to calculate before the server skips on to the next task." Try changing it to these values:
    Code (Text):
          tile: 8
          entity: 16

    These settings help a lot, especially for unloading chunks and too many mobs spawning.
    This is the maximum amount of mobs and animals that can spawn around a player. If you are getting major lag and lots of entities, try changing this to:
    Code (Text):
      monsters: 50
      animals: 10
      water-animals: 3
      ambient: 4

    This feature is meant to unload unused chunks at a regular time. Where period-in-ticks is how long and load-threshold the minimum amount of chunks that have to be loaded since the last unload for it to unload any more. Basically if no one is loading any chunks then it won't try to unload any:
    Code (Text):
      period-in-ticks: 300
      load-threshold: 300

    Self explanatory really. Just try changing it to this:
    Code (Text):
      animal-spawns: 400
      monster-spawns: 40
      autosave: 6000
    Yes, you heard it right, apparently changing these can have an affect on the total performance.
    This is how hard the server works to compress the data sent between the server and the client to reduce lag. But sometimes having it on a low setting (aka compressing more) makes your server lag more! Best to experiment with yours but I have mine on:
    Code (Text):

    This option basically enables or disables whether the server sends stats to Mojang. Some people say they get a performance boost with it off, so just try it:
    Code (Text):

    We are not responsible for any damage these settings may cause! Please take a backup of the original files before editing so you can safely restore them back if anything goes wrong.​
  • Loading...
  • Loading...