Balancer mechanics: Difference between revisions
m (→Further reading: added link to new guide) |
m (explain input + output balance) |
||
Line 1: | Line 1: | ||
{{Languages}} | {{Languages}} | ||
Balancers are used to evenly distribute items over multiple belts or multiple belt lanes. | Balancers are used to evenly distribute items over multiple belts or multiple belt lanes. | ||
Balancers that are input balanced take evenly from all input belts/belt lanes. Balancers that are output balanced distribute evenly to all output belts/belt lanes. Ideally, a balancer should be input and output balanced. | |||
== Belt balancers == | == Belt balancers == | ||
Line 13: | Line 15: | ||
=== Throughput === | === Throughput === | ||
[[File:4to4_balancer_throughput_limit_demo.gif|right|384px]] | [[File:4to4_balancer_throughput_limit_demo.gif|right|384px]] | ||
Balancers that are '''throughput limited''' may not be able to provide maximum output if one or more outputs are blocked. To be '''throughput ''un''limited''', a balancer must fulfil the following conditions: | |||
#100% throughput under full load. | #100% throughput under full load. | ||
#Any arbitrary amount of input belts should be able to go to any arbitrary amount of output belts. | #Any arbitrary amount of input belts should be able to go to any arbitrary amount of output belts. | ||
Balancers often do not fulfill the second condition because of internal bottlenecks. The gif on the right shows a 4 → 4 balancer being fed by two belts, but only outputting one belt which means that its | Balancers often do not fulfill the second condition because of internal bottlenecks. The gif on the right shows a 4 → 4 balancer being fed by two belts, but only outputting one belt which means that its throughput in that arrangement is 50%. The bottleneck in this balancer is that the two middle belts only get input from one splitter. So, if only one side of that splitter gets input, as can be seen in the gif, it can only output one belt even though the side of the splitter is fed by a splitters which gets two full belts of input. In this particular case, the bottleneck can be fixed by feeding the two middle output belts with more splitters. This is done by adding two more splitters at the end of the balancer, as it can be seen here: [[File:4to4_balancer.png|center|125px]] | ||
However most balancers' bottlenecks can't be solved as easily. A guaranteed method to achieve throughput unlimited balancers is to place two balancers back to back that fulfil the first condition for throughput unlimited balancers (100% throughput under full load). The resulting balancer is usually larger than a balancer that was initially designed to be throughput unlimited. This is the case because they use more splitters than the minimum required amount of splitters for a throughput unlimited balancer. For n → n balancers where n is a power of two number, {{Key|n×log<sub>2</sub>(n)−n÷2}} can be used to calculate how many splitters are needed. This formula is based on the number of nodes in a [[WIKIPEDIA:Clos_network#Bene%C5%A1_network_(m_=_n_=_2)|Beneš network]], which is essentially the same as a throughput unlimited balancer — it allows any input to reach any output. {{clear}} | However most balancers' bottlenecks can't be solved as easily. A guaranteed method to achieve throughput unlimited balancers is to place two balancers back to back that fulfil the first condition for throughput unlimited balancers (100% throughput under full load). The resulting balancer is usually larger than a balancer that was initially designed to be throughput unlimited. This is the case because they use more splitters than the minimum required amount of splitters for a throughput unlimited balancer. For n → n balancers where n is a power of two number, {{Key|n×log<sub>2</sub>(n)−n÷2}} can be used to calculate how many splitters are needed. This formula is based on the number of nodes in a [[WIKIPEDIA:Clos_network#Bene%C5%A1_network_(m_=_n_=_2)|Beneš network]], which is essentially the same as a throughput unlimited balancer — it allows any input to reach any output. {{clear}} |
Revision as of 15:52, 28 November 2018
Balancers are used to evenly distribute items over multiple belts or multiple belt lanes.
Balancers that are input balanced take evenly from all input belts/belt lanes. Balancers that are output balanced distribute evenly to all output belts/belt lanes. Ideally, a balancer should be input and output balanced.
Belt balancers
Belt balancers use the mechanic that splitters output items in a 1:1 ratio onto both their output belts. That means that a splitter can be used to put an equal amount of items on two belts. Since the process can be repeated infinitely, balancers with 2n output belts are easy to create.
Balancers also use the mechanic that splitters take an equal amount of items from both input belts. That means that a splitter connected to two input belts will evenly distribute those items onto the the two output belts. To balance belts it has to be made sure that the output belts contain an equal number of items from each input belt.
Throughput
Balancers that are throughput limited may not be able to provide maximum output if one or more outputs are blocked. To be throughput unlimited, a balancer must fulfil the following conditions:
- 100% throughput under full load.
- Any arbitrary amount of input belts should be able to go to any arbitrary amount of output belts.
Balancers often do not fulfill the second condition because of internal bottlenecks. The gif on the right shows a 4 → 4 balancer being fed by two belts, but only outputting one belt which means that its throughput in that arrangement is 50%. The bottleneck in this balancer is that the two middle belts only get input from one splitter. So, if only one side of that splitter gets input, as can be seen in the gif, it can only output one belt even though the side of the splitter is fed by a splitters which gets two full belts of input. In this particular case, the bottleneck can be fixed by feeding the two middle output belts with more splitters. This is done by adding two more splitters at the end of the balancer, as it can be seen here:
However most balancers' bottlenecks can't be solved as easily. A guaranteed method to achieve throughput unlimited balancers is to place two balancers back to back that fulfil the first condition for throughput unlimited balancers (100% throughput under full load). The resulting balancer is usually larger than a balancer that was initially designed to be throughput unlimited. This is the case because they use more splitters than the minimum required amount of splitters for a throughput unlimited balancer. For n → n balancers where n is a power of two number, n×log2(n)−n÷2 can be used to calculate how many splitters are needed. This formula is based on the number of nodes in a Beneš network, which is essentially the same as a throughput unlimited balancer — it allows any input to reach any output.
Lane balancers
Lane balancers evenly distribute input items onto the output lanes and evenly take them from the input lanes.