Inserter vs UPS

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
zggz
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Dec 07, 2017 6:40 pm
Contact:

Inserter vs UPS

Post by zggz »

Hello everyone.
Screenshot_5.png
Screenshot_5.png (5.28 KiB) Viewed 6982 times
I have a lot of inserters on map and now i need to understand how they work.
My task - maximize UPS of my game.

Example1:
blue chest --> inserter --> assembling machine.
Drons delivering items to the chest.

Questins:
1. What type of inserter we must use to maxize FPS?
2. How much items we need to set on filter in chest?
3. Override stack size. How can i use it?
How i think:
1. I think that green inserter --> less rotations --> more UPS.
2. We need items in chest for Full inserters moving (12 for green).
3. No ideas. Minimal stack size will be better in this case.

Example 2:
Assembling machine -->inserter --> chest.

1. What type of inserter i must use here?

If machine produce less 2.5 items/s - yellow 2.5<blue<6.93 6,93<green<27,7 27,7<we need green+yellow, or something like this.
To maximaze UPS we must use green inserters and they must take 12 items at every move, but there is no way to do this.

i'm right?

bobucles
Smart Inserter
Smart Inserter
Posts: 1669
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Inserter vs UPS

Post by bobucles »

Do everything direct to train.

Zanthra
Fast Inserter
Fast Inserter
Posts: 207
Joined: Fri Mar 25, 2016 8:18 am
Contact:

Re: Inserter vs UPS

Post by Zanthra »

I do not believe that any inserter type or setting would be significantly better than another. Theoretically you may see very slight improvements using stack inserters set to max stack size of 12 everywhere, but these improvements are dwarfed by the computation cost of the logistics network. Consider that for each inserter, the game checks the source square for resources the destination square needs and will move it if necessary. For the logistics network on the other hand, each blue chest needs to be paired with a provider chest that has the resources it needs, and a robot to take those resources. The cost of an additional inserter may only be 1-2 additional nanoseconds (a wild guess, but if it's in an efficient loop than 4 clock cycles may be a reasonable assumption), the increase when adding a new requester chest may be 1-2 nanoseconds per provider chest you have in the network. With 1000 providers and 1000 requesters it could start to use significant time, around a millisecond (one update in 60 UPS has 16 milliseconds). Adding a single requester chest would be as costly as adding 1000 inserters. This of course is probably heavily optimized by only searching some of the source and destination, and stopping when they find a match, but the idea is that the cost scales greater than linearly with the number of requesters and provider chests, and is much greater than the cost of the inserters.

Basically, unless you have more than a million inserters, I don't think they are a significant impact on your UPS (perhaps around 0.2 ms per update at 70 thousand), and you could do much better finding other places to save UPS.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Inserter vs UPS

Post by Aeternus »

Typically, stack inserters are better for UPS in most cases. When a building is idle or doesn't need resources, any inserters attached to it are also idled. Since stack inserters move more cargo per swing, they will be working less of the time typically. The only places where stack inserters are not useful is where you are not moving items in bulk, for instance with stuff that has a stack size of one, or on long recipes with just one item on the output. For those use the Fast inserter. Avoid the yellow and black inserters entirely, they are slow which means their active times are a lot longer.
Avoid using empty ground where able. Devs stated inserters attached to an object (chest or building) idle when there's nothing to do, but inserters that grab from open ground have to check each tick. I do not know if this includes belts. So if you use inserters to move cargo around a corner, put a small one-stack limited chest inbetween.

zggz
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Dec 07, 2017 6:40 pm
Contact:

Re: Inserter vs UPS

Post by zggz »

Zanthra wrote:Adding a single requester chest would be as costly as adding 1000 inserters.
Are you sure?
Now i have 34 000 blue chests. May be they take all fps? :D Teoretically i can change design of whole base and only 12k blue chests will remaining.
May be you have another non-obvious information how to save fps?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Inserter vs UPS

Post by DaveMcW »

Moving inserters are bad for UPS. Stopped inserters are almost free. So the goal is minimize the time inserters spend moving.
  • Use max stack size whenever possible (stack inserters).
  • Use the fastest inserters (avoid black, yellow and red).
  • Direct inserting between two assembling machines only has half the UPS cost, compared to putting a chest/belt/train in between.
  • Inserters attached to belts are twice as slow.
  • Inserter chains through bare ground and cars/tanks are very slow, use chests/trains instead.
  • Filter inserters use slightly more UPS, try to optimize your designs so they aren't needed.
  • Inserters that don't do much (say, a long-handed inserter that moves 3 science packs from a belt to a lab every 180 seconds), also don't give you much UPS by optimizing them.
  • Inserters emptying furnaces can be slowed down for a stack size of 12 every time, using a circuit network clock. However, the circuit network also eats UPS. The result is a slight UPS gain on iron plates, but a slight UPS loss on steel plates.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Inserter vs UPS

Post by Aeternus »

DaveMcW wrote:Moving inserters are bad for UPS. Stopped inserters are almost free. So the goal is minimize the time inserters spend moving.
Inserters emptying furnaces can be slowed down for a stack size of 12 every time, using a circuit network clock. However, the circuit network also eats UPS. The result is a slight UPS gain on iron plates, but a slight UPS loss on steel plates.[/list]
Do we have any ideas on how much UPS circuit networks eat? I've been using them liberally but am noticing an UPS slowdown. How does circuit network UPS drawbacks work? Does the size/amount of members of a network pose a problem? (for if so, I've shot myself in the foot by adding red and green signal to the power poles that run the length of my factory)

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Inserter vs UPS

Post by DaveMcW »

Power poles are free, but everything else that reads or outputs to the circuit network costs UPS. The cost is a small fraction (10%?) of a normal entity. Circuit networks never go to sleep for inactivity so it can add up quickly.

zggz
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Dec 07, 2017 6:40 pm
Contact:

Re: Inserter vs UPS

Post by zggz »

Thank you for every one.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Inserter vs UPS

Post by Aeternus »

DaveMcW wrote:Power poles are free, but everything else that reads or outputs to the circuit network costs UPS. The cost is a small fraction (10%?) of a normal entity. Circuit networks never go to sleep for inactivity so it can add up quickly.
Yikes. I've added circuits to every one of my stations... Guess I got some maintenance to do.

Dooces
Inserter
Inserter
Posts: 28
Joined: Wed Jan 04, 2017 5:50 pm
Contact:

Re: Inserter vs UPS

Post by Dooces »

zggz wrote:
To maximaze UPS we must use green inserters and they must take 12 items at every move, but there is no way to do this.

i'm right?
While by no standard am I an expert, but I can offer you a bit of what I've learned regarding inserters and UPS. Consider everything I say to be probably 90% wrong, as I do, instead try to follow the logic behind what I try to do, as its more likely to have any merit.
UC9NaCf.jpg
UC9NaCf.jpg (586.94 KiB) Viewed 6658 times
(boxes on input lines is currently being tested, instead of isolation splitters, and set to 11/12, so they hang inactive over the chest 11/12 times they take off the belt, so they dont stay active when the belt is moving, testing the cpu cost of moving the material twice vs having an isolation splitter)
With this setup, I have the output belts infront of the output inserters circuit controlled (via a timer, then a decider sending grey = 1 to go on, so the circuit network the belts are attached to isnt changing every tick), this causes the buffer in the furnace to build up. With appropriately timed belts, 2 furnaces work at ~98%, the 3rd works at ~95%, with each set of 3 filling the equivalent of 1 yellow belt. Belt orientation is such that the inserter goes inactive between each item drop from hand, and stays inactive while belt is turned off, so it doesnt tick active every time the furnace completes a craft.

I have a similar setup with LDS, though I have to force feed it extra mats to manipulate the output buffer to store 4+ at a time. For red circuits, I have them load balanced, again so none are running at 100%, which allows their output buffer to build up, allowing the output inserter to take 8+ red circuits per swing.

427520_20180518092532_1.png
427520_20180518092532_1.png (3.82 MiB) Viewed 6658 times

For green circuits, I have 2x inserters on the output of the cable asm going into a (filtered) car, then 2x inserters taking from the car and going into green chips, this avoids having to belt (or bot) a 2nd output from the cable asm, as it requires 2x output inserters.

Making sure your asms are load balanced and not outputting 100% will automatically cause your asms/furnaces internal output buffer to fill up, allowing output inserters to take more items at a time. I found this much easier to do with belts then bots (infact, short of circuit controlling all the inserters, I didnt figure out a great way to do it with bots). Its more important to do this with bots though, imo: if the inserter is removing 1 item at a time from an asm or furnace into a passive provider, and its in high demand, a bot can scoop up that 1 item and carry it away, potentially causing both your inserter to work 12x more often, and your bots to move 4x more often, (a double whammy)

While I havnt figured out how to get every stack inserter everywhere to always move 12 at a time, there are designs that can influence them to take the most possible. Without doubt even better ways than I have come up with (ideally, every design iteration would be tested for efficiency, but that means I get nothing built :P)

Zanthra wrote:
Basically, unless you have more than a million inserters, I don't think they are a significant impact on your UPS (perhaps around 0.2 ms per update at 70 thousand), and you could do much better finding other places to save UPS.
Inserters take a significant portion of cpu time (20%+ @ 17k inserters, asms @ 10%), and are currently my lowest hanging fruit for optimization.

Post Reply

Return to “Gameplay Help”