The Factorio Benchmark Website

test-000004 : Does the number of slots or type of chest influence the performance cost?

Factorio Version 0.16.51

The TLDR

Using the fewest number of slots consistently performed the best. There did not seem to be any significant difference between wooden and steel chests when both were limited to the same number of slots.

The Question

Does limiting the number of slots (using the red x) make inserting into a pulling out of chests more efficient? When putting items into a container, we have to find a slot to put them in. It's likely that red slots are prevented from being considered for insertions. Normal chests do not do any sorting of items inside. This means that every slot must be checked to see if it contains some of the item we are inserting. Steel chests have up to 48 slots, while wooden chests have up to 16. Both can be limited down to 1 slot.

The Test

For our test we need to compare against several key slot enablement points. Firstly, we want to add a test case for 1 slot enabled on all chests. Secondly, we should have a point for 16 slot enablement. This is the maximum value that a wooden chest can hold, and by testing a steel chest at this point can tell us how disabled slots fare. Finally we should test at the steel chest maximum, 48 slots.

The design we want to test is one that produces green science. This particular design takes in raw ore, and converts it through all necessary components until it spits out a full blue belt of green science packs. These science packs are then voided off in an infinity chest. To achieve the scale necessary that the test will roughly model the performance of a megabase, we will scale each variant of the design to 200 total copies. This yields an effective UPS of the low to mid 50s, well within our ideal 60UPS.

The design consists of numerous chest handoffs and passthroughs, which have a varying amount of throughput. This should be decently representative of the cost of the chest slots. Inserters that were pulling off a belt and putting into a chest were primed. Priming inserters is the idea where an inserter rests on a chest rather than resting on the belt. This can have a significant performance uplift compared to resting on the belt, as when an inserter rests on the belt, it wakes anytime the belt moves. This will be covered separately in test-000005.[1] The key interest in priming inserters here was to ensure that each design had a fair % of their inserters primed. Depending on the exact tick that the map was copied to 200 total copies, one or another design could by happenstance have more or fewer of its inserters naturally primed. An automated lua script was used to prime each design several times. It is available here.

A small number of inserters in the design can some times grab a number of items other than 12. This means that some of the inserters can lose their priming, which lowers their overall performance. Given that the belts feeding each of the designs are identical, this potential issue will likely effect every design in a very similar way. It is believed that this will have neligible impact to the overall hierarchy that each slot configuration has.

The Data

As shown by the data, the best result (Wood 1 slot) was roughly 6.5% better than the worst (Steel 48 slots)

There does not appear to be a strong indicator that wooden chests are better or worse than steel chests. Less than 1% difference between these two seems more likely to be caused by the noise of the test over any big victory for wooden chests. However this potential difference will be revisited in a more synthetic and controlled manner in a future test writeup.

Closing

There seems to be a clear advantage to ensuring all containers are limited to as few slots as possible. Full raw data available in .ods format in the raw data folder. The maps used for this test can be downloaded from here.