UPS class unit (no enemies) / electric network

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
stormbind
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Feb 13, 2023 6:11 pm
Contact:

UPS class unit (no enemies) / electric network

Post by stormbind »

Hi all,

we're running a big base on 1.1.59 and ups is becoming quite troubling.
The game is heavily modded (~150mods) and I try to increase the speed.
So: no biters, no pollution, no nuclear, etc and UPS is around 25.

When I check the time usage, entity time usage is on top as expected, but what I do not understand is, why the "class unit" and electric network taking so much time. We have one big electric grid with solar.

Just in case I forcefully removed all enemies, all fish and everything i could find, nothing changed to class unit time consumption...
Is there a way to check what actually is in the class "unit", as I was not able to find anything but "it's the enemies".
Attached you find screenshots from debug graph and the modlist

Thanks in advance!
Attachments
mod-list.json
(11.03 KiB) Downloaded 36 times
factorio_time_usage_1.png
factorio_time_usage_1.png (853.01 KiB) Viewed 1826 times
factorio_entity_time_1.png
factorio_entity_time_1.png (313.93 KiB) Viewed 1826 times

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 315
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by Stringweasel »

The Electric Network could be high for a couple of reasons. Firstly, it kindof includes the fluid update as well, so for a large base it could go high. But 6ms is quite high. The other problem could be if you have many isolated networks which costs a lot of UPS. Try to not have any poles not connected to anything. For more information you can read Alt-F4 #52, and maybe using Puppy's UPS Tools to find such networks.

As for the unit timing being high, that could be Mining Drones. Do you have many little guys doing your mining? Try removing them and using regular miners, or try place the depots closer to to drones maybe. You could also just remove all the biters, that will give you a nice UPS bump.

Other big UPS cost is all the loaders you're using, but that's hard to reduce.
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by lyvgbfh »

I believe the units also include the AAI vehicles. If you're primarily using those, the cost can add up. The other thing to note is that the time cost of loaders/inserters is affected by the size of storage that they access - overusing warehouses in a large save can have an impact on performance.

stormbind
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Feb 13, 2023 6:11 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by stormbind »

Thanks for your answers. The units actually were some ~4000mining drones. We are replacing them and it got better already. We have no AAI vehicles etc, so, no drones (and no enemies) should put that value close to zero hopefully.
As for the electric network - it is the bio farms, they each have a hidden electric pole which somehow creates its own electric network. As we have around 300 bio farms, we also have around 300 networks. I deleted them all and the time usage went from ~6ms to ~2ms, so this is quite good. ...now we need to find a way to replace them with sth else, a lot depends on wood and its byproducts ;)
Unfortunately, I was not able to get Puppys UPS tool running due to conflicting versions, so we need to hunt for standalone poles and not connected stuff.

As for the loaders. We currently have around 84000 loaders as we opted for setups like this extensively.
factorio_loader.png
factorio_loader.png (8.62 MiB) Viewed 1689 times
So instead of splitters we often use chests with 1 ingoing and 2 outgoing loaders as you can see on the left and right. (The main reason is, that ultimate splitters are still way too expensive to use them all the time in our setup).
Also we have around 900 storage deposits (they have 2000 spaces each) mainly in our waste management system and ore processing, they often have multiple loaders for additional throughput.
Is this all bad UPS wise? :P

In testing, in single player, this increased UPS from ~25 to ~35, which is a huge difference (running on a 5800x3d and 64gb of 3600mhz ram).

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 315
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by Stringweasel »

stormbind wrote:
Thu Feb 16, 2023 12:32 pm
As for the loaders. We currently have around 84000 loaders as we opted for setups like this extensively.
Oof, that would do it :D

If you want to build at this scale it's typically good try some good UPS practices. And a big portion of that is reducing the amount of inserters/loaders you have, as they are quite costly. For the setup you posted splitters might cost more materials, but is waaaaaay cheaper in terms of UPS.

But glad you improved your UPS! Can imagine there's a big difference between 25 and 35 when spending many hours on it.

Edit: words are hard
Last edited by Stringweasel on Thu Feb 16, 2023 3:16 pm, edited 2 times in total.
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2530
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by FuryoftheStars »

Stringweasel wrote:
Thu Feb 16, 2023 1:32 pm
For the setup you posted splitters might cost more materials, but is waaaaaay more costly in terms of UPS.
Costly, or efficient? Apologies, I'm interpreting "costly" to mean worse, but I feel as though you were meaning "better".
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 315
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by Stringweasel »

FuryoftheStars wrote:
Thu Feb 16, 2023 2:14 pm
Stringweasel wrote:
Thu Feb 16, 2023 1:32 pm
For the setup you posted splitters might cost more materials, but is waaaaaay more costly in terms of UPS.
Costly, or efficient? Apologies, I'm interpreting "costly" to mean worse, but I feel as though you were meaning "better".
Oops, you're right, thanks!
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

stormbind
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Feb 13, 2023 6:11 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by stormbind »

So, hypothetically, if we would switch from 3 loader + chest to 1 splitter - how much would this be worth performance wise? It's a lot of work but can easily be done over time... somehow this seems like a rare setup we're using :D

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 315
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by Stringweasel »

stormbind wrote:
Thu Feb 16, 2023 3:21 pm
So, hypothetically, if we would switch from 3 loader + chest to 1 splitter - how much would this be worth performance wise? It's a lot of work but can easily be done over time... somehow this seems like a rare setup we're using :D
Well, currently all your loaders currently take about 15ms per update. If you lower the amount of loaders you're using by 33%, that would reduce it to 10ms, which would theoretically take you from 35 UPS (28ms per update) to 42 UPS (23ms per update). :geek:
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

stormbind
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Feb 13, 2023 6:11 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by stormbind »

But splitters aren't free either, so load would increase there as well?

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2530
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by FuryoftheStars »

Yes, but at a different rate. Splitters handle their job differently than loaders/inserters, as the latter have multiple different types of sources and targets, different code they have to loop through for it all (and chest inventories cause delays in this, too), whereas the former have a much stricter and smaller set of rules and possibilities to go through. Splitters are also, I believe, handled in the transport lines update instead of entity, and transport lines has had some very heavy optimizations done to it.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

DaleStan
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Jul 09, 2018 2:40 am
Contact:

Re: UPS class unit (no enemies) / electric network

Post by DaleStan »

If you want/need the smaller size of chest+loader instead of splitter, you can try Miniloaders instead. They look like loaders, but they're actually inserters, so they get all the inserter optimizations and behaviors.

You'll still have the chest costs; smaller (wooden) chests should benefit both Miniloaders/inserters and genuine loaders.

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 315
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: UPS class unit (no enemies) / electric network

Post by Stringweasel »

FuryoftheStars wrote:
Thu Feb 16, 2023 5:54 pm
Yes, but at a different rate. Splitters handle their job differently than loaders/inserters, as the latter have multiple different types of sources and targets, different code they have to loop through for it all (and chest inventories cause delays in this, too), whereas the former have a much stricter and smaller set of rules and possibilities to go through. Splitters are also, I believe, handled in the transport lines update instead of entity, and transport lines has had some very heavy optimizations done to it.
Exactly this. Splitters are much more optimized than loaders. Not to mention that you need three loaders and a chest to replace a single splitter. In my mind it's like this (maybe real?) story about a giant toothpaste company where they design a complex system to detect accidental empty boxes on their conveyer belt and to remove it mechanically. And then after a while, after the system was apparently working so well, they realized it was never turned on, and the technition just put a fan next to the conveyer which blew off the boxes. (The 3xloader+chest is the over complex system :P )
DaleStan wrote:
Thu Feb 16, 2023 6:32 pm
If you want/need the smaller size of chest+loader instead of splitter, you can try Miniloaders instead.
Not 100% sure, but this could be worse performance-wise. Loaders and inserters are likely quite similar in UPS cost. And replacing a single loader with miniloader will effectively replace it with two (or likely more with fast modded belts) inserters.
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

Post Reply

Return to “Technical Help”