A badly performing server is undesirable to many and we are all responsible for contributing to lag, some more than others.
The primary cause for lag are entities (including block entities) and this is because they have heavy calculations that take time to process.
Minecraft runs best at 20 ticks per second and predominantly runs on a single processor thread. A thread can only perform one calculation at any given time, and each tick must not exceed 50ms to stay within that 20 TPS target.
Aside from server adjustments, we have a number of guidelines and features in place reduce any possibility of exceeding 50ms per tick.
Note: Guidelines should be followed the vast majority of the time.
- Avoid having more mobs (including villagers) than you need.
- Use spawners instead of vanilla mob farms.
- Cull unnecessary villagers and turn off breeders when not in use.
- Nerf all trading villagers (see reference)
Farm Limiter is a plugin that reduces the amount of mobs collected within a given area.
You should not attempt to circumvent the plugin's limits as they're there for a reason.
The rules below apply per type (cow, zombie, etc):
- Max of 5 within a radius of 1
- Max of 10 within a radius of 8
- Max of 25 within a radius of 24
Hoppers do two things, they pull in items from above and push items to the next hopper (excluding below).
Unless a container is placed on top of the hopper, they search for items to collect. Otherwise, they search through the entire container for an item to pull.
We can cut down on performance costs by placing a composter on top of the hopper.
Composters are containers, but they do not tick nor can they store items. This drastically cuts down on the calculations for pulling in items.
Redstone can be incredibly mindblowing and it shouldn't be surprising that it can hurt performance a lot.
- Power off machines when not in use.
- Do not have clocks running all the time, consider using comparators.
- Keep contraptions and auto farms small.
- Avoid an excessive amount of pistons and hoppers.