What is this about? After working with the tech admins to run some internal testing (which is detailed below) we have decided to implement a new policy regarding the use of hoppers on pve to attempt to alleviate some of the strain on the server and improve the experience of our players.
What exactly is server lag? The server measures performance by counting ticks-per-second (TPS) and a perfect TPS is 20. Everything the server has to process uses a % of the tick rate to calculate. We’ve already attempted to alleviate the strain on the server by using a dynamic render distance (fixed at 4 chunks at the start of the Revision), replacing traditional iron farms with golem spawners, implementing EasyRider to allow users to obtain top-level horses without the need to keep numerous breeding horses around, and reducing entity activation ranges. Despite these changes, we’ve been seeing hoppers take up almost 50% of the total tick every second which will continue to cause the server to lag.
What have we done so far? Padmins have been reaching out to users already during this revision, and through those efforts we have been able to reduce the hopper tick from 50% down to 20%-35% of the total. As more hoppers are used for item transit however that number may rise.
What else is being done? When we are alerted to lag issues we run checks on three main types of things. First we check to see if there are any excessively large mob groupings anywhere and ask users to cull if possible (generally these are at grinders and are easily fixed). We also check for running redstone to see if that is causing any sudden dips in response time. More recently we’ve been checking for large hopper machines and asking users to remove them where possible.
What we are asking of players at this time:
Please limit your hopper use for moving items to only those necessary to move items into chests/dispensers. Where possible you should use water flows to move items along channels to be picked up by a single hopper into a chest rather than chaining hoppers together.
Please refrain from building large automatic machines using hoppers - this includes auto-sorters.
These are pre-emptive measures all users can take to help with server strain. In the event that we do find large hopper creations moving items we will follow up with users to come up with alternative methods, however we do reserve the right to make adjustments to hoppers if the situation warrants it.
Test Data - Tests were run on pve-dev using a superflat world with no mobs or other structures. Each “row” consists of 50 hoppers moving dirt from one double chest to another (with each “layer” as 20 rows placed side-by-side). Timings were reset at the beginning of each test and returned after 5 minutes of activity.
We decided on 4000 hoppers by running a logblock query for the entire revision to see how many had been placed by users -at the time of the test we estimated there were ~3600 hoppers on the server. The number has dropped to around 2000 hoppers since padmins began reaching out to users.
Idle Hoppers represent the number of hoppers placed, but not currently passing items. Active Hoppers represents the number of hoppers placed and passing items. tileEntityTick represents the % of TPS that the hoppers are using during a given test.
all rows idle, first hopper disabled via redstone
all rows idle, first hopper disabled via redstone, except 1
all rows idle, first hopper disabled via redstone, except 2
all rows idle, first hopper disabled via redstone, except 5
all rows idle, first hopper disabled via redstone, except 10
3 layers idle disabled via redstone, 1 layer active (20 rows)
2 layers idle disabled via redstone, 2 layer active (40 rows)
1 layer idle disabled via redstone, 3 layer active (60 rows)
all layers active (80 rows)
What does this mean? At 4000 active hoppers (that is, hoppers actively passing items between them), those hoppers will use 50% of our servers processing power. This leaves only 50% for other actions (entity processing, mob AI, player activities, etc). As hopper actions accumulate and reach a significant tick percentage (~30%), everyone on the server will begin to feel the effects due to the server not having enough resources to process everything at a normal rate.