Reducing Lag

Aug 5, 2017
Reducing Lag
  • Reducing 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.


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

    merge-radius
    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):
        merge-radius:
          item: 4
          exp: 6



    item-despawn-rate

    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



    view-distance

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



    entity-activation-range

    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):
        entity-activation-range:
          animals: 8
          monsters: 10
          misc: 2

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


    max-tnt-per-tick
    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


    max-tick-time
    (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):
        max-tick-time:
          tile: 8
          entity: 16



    bukkit.yml
    These settings help a lot, especially for unloading chunks and too many mobs spawning.
    spawn-limits
    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):
    spawn-limits:
      monsters: 50
      animals: 10
      water-animals: 3
      ambient: 4


    chunk-gc
    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):
    chunk-gc:
      period-in-ticks: 300
      load-threshold: 300


    ticks-per
    Self explanatory really. Just try changing it to this:
    Code (Text):
    ticks-per:
      animal-spawns: 400
      monster-spawns: 40
      autosave: 6000



    server.properties
    Yes, you heard it right, apparently changing these can have an affect on the total performance.
    network-compression-threshold
    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):
    network-compression-threshold=512


    snooper-enabled
    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):
    snooper-enabled=false


    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...