#Speaking about huge (HUGE) bases, what is the main drain of performance (UPS)?

1 messages · Page 1 of 1 (latest)

oblique acorn
#

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)?

mighty briar
#

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.

oblique acorn
#

Thanks for the info! Do I understand correctly, that large containers become hogs essentially because of inserters? 🤔 (or any other insertion/extraction from them)?

mighty briar
robust glen
#

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

hushed furnace
#

the main drain is just the volume of inserters and assemblers.

mighty briar
#

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

hushed furnace
#

logistic bots are cool and we love them

oblique acorn
severe sentinel
#

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.

oblique acorn
#

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.

severe sentinel
#

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.

oblique acorn
#

Yep, that's for sure. But they progressively decrease the amount of machines

oblique acorn
severe sentinel
#

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.

oblique acorn
severe sentinel
#

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.

severe sentinel
oblique acorn
#

Ah, ok. Makes sense.

severe sentinel
#

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...

oblique acorn
#

Well, it's still seems to be OK, because they significantly decrease overall amount of machines. At least if understood calculator correctly.

severe sentinel
#

Yes, that and you have to use productivity where possible which needs beacons to counter the negative speed.

mighty briar
#

Heavily beaconing is still the meta. Beacons are op

oblique acorn
#

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".

severe sentinel
#

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.

mighty briar
#

Unless you ban them (I do), an optimal factory will consist mostly of assemblers surrounded by beacons

oblique acorn
#

Yep, that's what I'm planning to do. Any objective reasons you decide to ban them?

hushed furnace
#

speed beacons with prod modules reduce the number of needed assemblers and inserters by a lot

severe sentinel
#

Assuming base game of course. If mods are involved that idea can deviate substantially.

hushed furnace
#

some people dont like how beacons look

severe sentinel
mighty briar
#

I don't like their strength. Same with logi bots. It's just a personal preference. Both base game and mods

oblique acorn
#

Good point 🤔

severe sentinel
#

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.

mighty briar
#

Inserters do use processing power when not in use though if there are items at their pickup location. Very little relatively but still

severe sentinel
#

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.

severe sentinel
oblique acorn
mighty briar
#

I think inserters are awake even if dropoff point is full

oblique acorn
#

If we count just swings

severe sentinel
#

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.

mighty briar
#

I think one of my mods makes inserters automatically wait for a full stack

#

Dunno which

severe sentinel
mighty briar
#

But I don't see the partial stack behavior

severe sentinel
#

Its with unload inserters.

#

Since they will unload with any items available, not just full hands of items available.

oblique acorn
severe sentinel
#

So in the case of a non-clocked beacon smelter it will be grabbing 1-2 plates per swing instead of 12.

mighty briar
#

Oh wait I realized why

severe sentinel
oblique acorn
#

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.

mighty briar
#

But more importantly, fewer assemblers

oblique acorn
#

Sure)

oblique acorn
mighty briar
#

Maybe. I don't know the specifics

proven mist
#

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.

severe sentinel
#

Which, if you build your base properly, will happen every factorio day.

ornate rampart
#

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

oblique acorn
#

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)

severe sentinel
#

If going that route consider mining directly into a train.

oblique acorn
#

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)

severe sentinel
#

Another approach would be smelting on site with ore directly inserted into beaconed furnaces.

#

This saves any transportation of ore what so ever.

oblique acorn
#

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.

ornate rampart
#

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.

somber musk
oblique acorn
oblique acorn
#

But, perhaps, we'll loose precious space for beacons 🤔

ornate rampart
#

You could skip the buffer chests and go wagon->assembler but then it's harder to share as many beacons.

oblique acorn
#

Yep. That's so many design considerations (and challenges) to keep in mind. And that's what really inspires me.

ornate rampart
#

😄 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

oblique acorn
#

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.

oblique acorn
#

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)?

severe sentinel
#

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.

ornate rampart
#

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

oblique acorn
#

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?

severe sentinel
#

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.

nova rapids
#

does the amount of items inside storage chests matter? Does the amount of storage chests with no inserters matter?

unreal stag
#

only when u interact, in & out.

nova rapids
#

that said, is there any benefit to keep the amount of items within the logistic storage as minimal as possible?

unreal stag
#

its like everything in factorio, store only what u need