I'm moving towards my first mega-base more and more, so I want to know what can cause the main performance issues? I won't probably face any problems in the nearest future, but still want to know in advance, so I could design things properly.
What is currently the main limitation of the biggest bases you are aware of (assuming a single PC/server)?
#Speaking about huge (HUGE) bases, what is the main drain of performance (UPS)?
1 messages · Page 1 of 1 (latest)
Pollution and Biters can hog resources. Big time. Turning them off via the console is common.
Containers with very large inventories can add up to be very large UPS hogs
Inserters dealing with belts are more UPS intensive than an inserter going from a container to another container (called direct insertion.)
Direct insertion is great.
Belts are more efficient than bots provided you don't have massive belt balancers in use.
The fluid system i believe takes up a decent amount of processing so i wouldn't transport fluids over very long distances except by train.
Thanks for the info! Do I understand correctly, that large containers become hogs essentially because of inserters? 🤔 (or any other insertion/extraction from them)?
Yeah. Because the inserter scans all storage slots I think was the reason.. Even if the slots are blocked (red). Blocking the slots still helps with UPS though.
Bots are more UPS efficient than belts (sad)
Pretty sure this is outdated as of 1.1. Multithreading transport lines allowed for some pretty major gains
the main drain is just the volume of inserters and assemblers.
Yooooooo what. I just checked some posts.
I had thought the belt update made them closer to as efficient as bots but still worse.
This is incredible news. Fuck logi bots I hate logi bots
Editing my above message
logistic bots are cool and we love them
I remember the times of 0.12, when belts were significantly less performant than bots, but then they optimized it, still before release. I thought they became more efficient than bots even back then)
In general inserters will be one of the big contributions to your factory update time. You want them to swing as little and quickly as possible. To such an extent that some end game smelter builds use clocked output inserters.
Due to inserting onto and off of trains, trains are not necessarily that good for UPS. Sometimes taking to and from belts can be better purely due to fewer inserter swings and less chest interaction.
So, other things being equal, seems like I would certainly want to make as much speed beacons as possible. To make less machines for the same output, and less inserter/belts. And to decrease energy consumption, actually. Which can also decrease underlying inserter/belts operations.
Beacons also have an update cost due to being polled every 60 ticks or so for power.
Power is UPS free to produce thanks to solar. It does have a memory complexity though, a megabase might have several gigabytes of solar panels.
Yep, that's for sure. But they progressively decrease the amount of machines
Isn't nuclear power a thing for mega-bases?
No, because solar scales infinitely better.
1 TW of solar uses as much update time as 1 solar panel and 1 accumulator.
1 TW of nuclear and even a 7800X3D is likely a slide show.
But don't accumulators by themselves cost UPS? Solar panels are understandably free. But accumulators can charge/discharge.
Nuclear is usually used for end game or in the run up to mega bases, where UPS optimisation is not really a concern and instead other factors drive the adoption.
Factorio has an optimisation for them. Since all acumulators will charge or discharge at the same time usually, they are treated as 1 it seems.
Ah, ok. Makes sense.
Same for lights. 1 million active lights cost the same update time as 1 active light. However lights do require a lot of update time when transitioning between day/night, so 1 million lights will likely slide show during that transition even if they have as good as no update time cost between.
Beacons do not have similar optimisation, for some reason...
Well, it's still seems to be OK, because they significantly decrease overall amount of machines. At least if understood calculator correctly.
Yes, that and you have to use productivity where possible which needs beacons to counter the negative speed.
Heavily beaconing is still the meta. Beacons are op
Yep) That's what I realized just a couple of days ago)
Now it makes even more sense in decreasing the amount of mentioned inserters as a "side-product".
I think bot based builds can still work, but they are probably the hardest thing to UPS optimise. From what I have seen, it involves fine tuning robot numbers to avoid land/takeoff as well as motion studies to keep robot flight distances minimal.
Unless you ban them (I do), an optimal factory will consist mostly of assemblers surrounded by beacons
Yep, that's what I'm planning to do. Any objective reasons you decide to ban them?
speed beacons with prod modules reduce the number of needed assemblers and inserters by a lot
Assuming base game of course. If mods are involved that idea can deviate substantially.
some people dont like how beacons look
Inserter count reduction does not matter too much since it might end up that the remaining inserters work more. It is active inserters that make up a lot of the update time, not just inserters existing.
I don't like their strength. Same with logi bots. It's just a personal preference. Both base game and mods
Good point 🤔
For example an input inserter will swing 12 times as much for a machine running at 12 times the speed because the machine needs 12 times the input.
Inserters do use processing power when not in use though if there are items at their pickup location. Very little relatively but still
This effect is visible in the base game with electronic circuit production. You often need 2-3 stack inserters to direct insert from cable assembler to electronic cricuit assembler in beacon setups.
Only if the machine is accepting items? Otherwise they go inactive.
But wait. If we speak about the same output amounts, it seems it actually does not matter if it's a single inserter doing 12 swings, or 12 insterters doing 1 swing each. Does it?
I think inserters are awake even if dropoff point is full
If we count just swings
That is where it does matter. 1 inserter with 12 items is a lot faster than 12 inserters with 1 item.
That is why mega base smelter setups are often clocked.
To make sure that the output stack inserters only swing with 11 to 12 plate.
I think one of my mods makes inserters automatically wait for a full stack
Dunno which
No they will go inactive if the droppof is full, but every change made to the dropoff will wake them up for 1 update to check.
But I don't see the partial stack behavior
Its with unload inserters.
Since they will unload with any items available, not just full hands of items available.
Yep. But I meant the other thing. What I meant is that no matter if we clock them or not. The total amount of swings will still be the same.
So in the case of a non-clocked beacon smelter it will be grabbing 1-2 plates per swing instead of 12.
Oh wait I realized why
No because stack inserters hold up to 12 items. So clocking output results in up to a 11/12 reduction in inserter swings.
Ah, still I'm talking abount another thing.
We can clock insterters both in beaconed and non-beaconed setups to fill the stack. Let's assum we do clock. In both variants (beaconed and non-beaconed), the total amount of swings will be the same.
But in beaconed, we still have less inserters.
But more importantly, fewer assemblers
Sure)
As I understand it, blocking the slots helps optimize insertion into container, but not the extraction.
Maybe. I don't know the specifics
Just a note regarding accumulators, they are not treated as one, when you build new one it will be empty and will hold different charge until fully charged or until every accumulator is depleted.
Which, if you build your base properly, will happen every factorio day.
Same items fewer swings
The reason clocking is good is because it reduces the amount of active insertion time. It's not swings specifically, though that's very closely linked, it's the amount of time that inserters spend active.
Even in a highly optimized base it's still inserters that make up the majority of UPS cost
A beacon costs approximatly 1/20th of an active assembler in update time
Here's my 60 ups 20k for instance
Almost nothing in belts, under an ms, even trains are reliably only like 2.6ms or so
This is most of it, 2-18 trains, it's over 10km long.
One build isn't clocked. Just one
Thought it would also be a good idea to beacon miners like that. Descreases the overall amount of miners, and it's not hard to swap the columns upon depletion. (for some reason I thought beacons are 2x2 🙂 so, there is an unnecessary gap now after them)
If going that route consider mining directly into a train.
Yep, I just saw somebody's doing that. Sounds cool - no belts. But then I thought that it'll be problematic to load them more-or-less equal. Not sure I wanna mess with that)
Another approach would be smelting on site with ore directly inserted into beaconed furnaces.
This saves any transportation of ore what so ever.
I was actually thinking about doing smelting just near the deposit, so I don't transport raw ore. But then I realized I still want to have some central hub. Unless I figure out how could I make many-to-many deliveries of the smelted results. I haven't yet palyed a lot around circuiting the rail-network.
avoiding balancers is another good idea in general. The main problem is waking two or more belt entities. There are some weird exceptions, but they're largely exceptions. Direct to train mining has some minor issues as you observed, but the general solution people use is to move a bit farther away from home in order to get reasonably sized deposits, and then only mining the center of patches. You can comfortably fit 10 wagons in max size patches only a few KM from spawn.
Mining to trains is best with higher productivity levels. There isn't really an advantage over belts at low prod, but at higher levels you do have significantly fewer machines producing the same amount of materials because the miners can output to train fastest.
There's also a fairly weird combination of effects regarding train centralization, where high traffic causing trains to stop, causes more repathing events. Ideally this should be avoided
UPS optimization is largely a game of "same thing, just with less." Trains also have a cost for moving, as a moving entity they have to collisioncheck, so there's a clear advantage to shipping higher tier materials over any distance. If you have ores at A, and want circuits produced at C, and have the option to place smeltery B somewhere in between, then minimizing the distance AB means more than BC, because there are almost twice as many ore trains. For example, Say it's 5 ore trains per minute, if you reduce their travel time by 1km but the 3 plate trains increase by 1km, you're saving two train-kilometers worth of collisionchecks.
The complexity comes when you start considering the whole picture, and saving every last drop you can. Should you even go back to train as plates, or is it cheaper UPS wise to ship copper to a nearby iron and then ship out circuits? Miner-belt-inserter-chest-inserter-wagon-inserter-chest-inserter-belt-inserter-furnace-inserter-belt-inserter-chest-inserter-wagon-inserter-chest-inserter-belt-inserter-wire assembler-inserter-green circuit assembler-inserter-belt-inserter-chest-inserter-wagon-inserter-chest-inserter-belt-inserter-[consumer] is the most common path I see, just not in the optimization community lol
Mine's miner-wagon-inserter-chest-inserter-furnace-inserter-belt-inserter-wire assembler-inserter-green circuit assembler-inserter-belt-inserter-[consumer].
And don't forget it's active insertion time, so when you're moving items from point to point, wagon to chest, or assembler to chest, etc., that's about 27 items/sec, whereas to belt is around 13 to maybe 19 tops. So you can move items much more efficiently with direct insertion.
That's me. I prefer belts, but love bots when I just need something specific and don't want to route, like artillery shells and science to labs.
Thanks. Didn't even think about utilizing big enough patches so I could have same-sized trains always loaded.
I think this chain can also be simplified by feeding wire assemblers directly from trains (or through buffer chests)?
But, perhaps, we'll loose precious space for beacons 🤔
Also, you have to train plates, which is a choice. There's stuff to do with directly inserting wires to the GC assmblers too. Once trains get involved it's hard to keep things efficient and 12 beacon, even, and many of my designs are 8 beacon or 10 beacon. I'm fairly sure my chain isn't optimal, but if trains are involved, it's close.
You could skip the buffer chests and go wagon->assembler but then it's harder to share as many beacons.
Yep. That's so many design considerations (and challenges) to keep in mind. And that's what really inspires me.
😄 That's what I was hoping for, just to bring your attention to the interesting questions of UPS optimization, get you looking at the right things
Sure, thanks) And that's why I created this topic) And thanks to everyone here, really. I wouldn't even think about some of the problems listed here, which I may face.
Btw, when still doing belts, is it preferrable to make undergrounds for performance?
I assume it won't fasten much the logical update of moving items, but perhaps will make less load on rendering logic (the part which is still done on CPU-side)?
Undergrounds do not affect performance anymore as far as I am aware. They should still have continuous transport lanes with above ground belts.
Render logic, possibly... But then again even a screen filled with items on belts might still only take 1-2 ms CPU time for render prep at worst on a modern CPU.
Render isn't really counted, the "thing optimizers care about" is the benchmark results https://factoriobox.1au.us/results?map=41bba28932b1c21d73dec1a18e6ed9722909626c9608f46e080fa8ce5f8ee5ff
There's guides about how to benchmark, you don't have to use factoriobox, but it controls for things like render and stuff. My production screen costs me almost 20 ups lol
https://www.reddit.com/r/technicalfactorio/comments/r6ye86/mechanics_of_transport_line_splits/
they do improve, because of 'cuts'
Speaking about pipes, I remember I heard to avoid intersections. Is it just a possible flow issue, or they also affect performance in a way? I've looked through FFF-274 (new fluid mechanics), and it seems fluid networks are updated in 2 passes, but still O(N). So, intersections should not affect UPS by themselves?
Those FFF-274 changes were never implemented.
Pipes to ground still help with throughput per unit distance. Pipe intersections still bias directions over others, all fluids act the same and have the same flow rate.
does the amount of items inside storage chests matter? Does the amount of storage chests with no inserters matter?
only when u interact, in & out.
I had in mind counting the logistic network as interaction
that said, is there any benefit to keep the amount of items within the logistic storage as minimal as possible?
its like everything in factorio, store only what u need