Reducing Lag - Historical

Applied By joshwenke: Jul 19, 2015 at 4:53 PM

Reducing Lag

Reducing Lag

A basic guide

Hey all! ssamjh here! I'm going to make this wiki because there is no other wiki that I can find that lists most of the ways to reduce lag.
Now, this isn't going to be a perfect guide. But I aim to make it the best I can. Anyone is welcome to improve it!

These settings are going to give you biggest boost out of the lot. So give them a try and see how it goes!
Now, depending on your server you may want to have this enabled or not. Truth is, players love to cheat. If players can't cheat they will likely move onto the next server. This option is completely up to you but I recommend setting it to:
Code (Text):
      enabled: false

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


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

(note to self: I need to make this more noob friendly)
According to the spigot.yml wiki "Controls the range in blocks that entities will become "visible" or otherwise known as "tracked" to the client. Entities outside of this range will be invisible as they are not being rendered to preserve CPU usage and bandwidth." I use these settings on my server and they seem to be a good balance:
Code (Text):
      players: 32
      animals: 32
      monsters: 32
      misc: 24
      other: 24

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: 3
  autosave: 3000
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):

That's all from me for now. I hope this helped you and feel free to edit and correct any mistakes I may have made!
I am not responsible for any damage these settings may cause. Please take a backup of the the origional files before editing so you can saftely restore them back if anything goes wrong.​