What consumes UPS?
What consumes UPS?
What mechanics are the most UPS expensive? I know that fluids are supposedly pretty expensive but what other mechanics / buildings hurt UPS the most?
Say like laser turrets: I have about 3-5k turrets in one of my factories but I really only need like a 5th of that now that I have damage upgrades. Do inactive turrets do enough harm to make it worth my time to remove them? The power drain doesn't really matter.
I have a 72 wide transport belt that stretches about a 5 minute train ride with nuclear fuel but my transport-lines update still takes < 1 ms. Does adding lots of splitters have a large impact to that? (I am using the splitters already but I was wondering if I should make an effort to minimize that)
My artillery range is large enough to keep most of the bugs out of my pollution cloud. (I get about 3 attacks per minute over my giant base) Would removing them help much since they aren't really attacking?
Those are just a couple of questions. Are there any other habits that I should be avoiding as much as I can?
Say like laser turrets: I have about 3-5k turrets in one of my factories but I really only need like a 5th of that now that I have damage upgrades. Do inactive turrets do enough harm to make it worth my time to remove them? The power drain doesn't really matter.
I have a 72 wide transport belt that stretches about a 5 minute train ride with nuclear fuel but my transport-lines update still takes < 1 ms. Does adding lots of splitters have a large impact to that? (I am using the splitters already but I was wondering if I should make an effort to minimize that)
My artillery range is large enough to keep most of the bugs out of my pollution cloud. (I get about 3 attacks per minute over my giant base) Would removing them help much since they aren't really attacking?
Those are just a couple of questions. Are there any other habits that I should be avoiding as much as I can?
Good things come in bags marked "SWAG"
Re: What consumes UPS?
With 0.17, fluids have been heavily (and even too much) optimized : the definitive version of the fluids physics should be a little slower.
Laser turrets are negligible. Your 72 wide but that stretches for kilometers would be well replaced by trains and modular construction.
Bots are also known as better alternative to belts UPS wise when used cleverly.
Some mods are real UPS killers (like warehouses with huge containers, ...) , but I don't know if you play modded.
A screen capture of your timings would help a lot, but I'd say that you've built so big that whatever the efforts for optimization, at some point, no computer will be able to keep a steady 60 UPS.
Laser turrets are negligible. Your 72 wide but that stretches for kilometers would be well replaced by trains and modular construction.
Bots are also known as better alternative to belts UPS wise when used cleverly.
Some mods are real UPS killers (like warehouses with huge containers, ...) , but I don't know if you play modded.
A screen capture of your timings would help a lot, but I'd say that you've built so big that whatever the efforts for optimization, at some point, no computer will be able to keep a steady 60 UPS.
Koub - Please consider English is not my native language.
Re: What consumes UPS?
Pathfinding by trains and biters is really expensive.
Re: What consumes UPS?
My base currently runs at a smooth 60 UPS - I only used it as an example of some large scale inefficiencies and Ive built too big at this point to be interested in rebuilding. In general is using less entities always better? I guess solar panels and possibly beacons are an exception to that but will using 2 inserters instead of one fast inserter be slower cpu-wise? (with the assumption that both cases can satisfy the demand)Koub wrote: ↑Tue Apr 23, 2019 5:17 am Some mods are real UPS killers (like warehouses with huge containers, ...) , but I don't know if you play modded.
A screen capture of your timings would help a lot, but I'd say that you've built so big that whatever the efforts for optimization, at some point, no computer will be able to keep a steady 60 UPS.
What do you mean by fluids being too heavily optimized? Did they sacrifice more realism for performance in 0.17?
I can imagine that it is far more efficient to have a train than a giant belt but I built it for a challenge to use no trains in my base. By modular construction I assume you mean things like smelting on site since ore has smaller stacks than plates or building circuits since they are even more compact.
What defines cleverly? Is that just for cases where the demand is low enough that running a belt to it is inefficient? I assumed that bots were the most efficient in all cases except for train-distance transportation. Is having smaller logistics zones better UPS wise or does it only reduce flight time?
I can imagine that biters can be expensive since they have to go long distances over who-knows-what terrain but trains surprise me. I assumed that with a much smaller set of paths that it would be fairly cheap. Maybe rail signals complicate things.
Good things come in bags marked "SWAG"
Re: What consumes UPS?
Well I assumed that you couldn't achieve 60 UPS, and that was the reason you created this thread. I'm quite impressed being wrong (both by the devs who can get such an optimized game, and your computer, that must be quite beefy, you wouldn't run that on a potato ).
For the remaining of my previous post, most advices were given with the idea that you needed to fix low UPS issues. The pieces of advice I gave are still valid to delay even more the apparition of UPS issues should you keep on building, but you don't need them at the moment.
The "clever" use of bots is indeed "small" (compared to the scale of your base) modular constructions that allow you to minimize belt length, robot pathing calculations, ... and minimize the number of entities needed : Despite the bots being VERY UPS friendly overall, small logistic networks that can operate with a few hundred bots each are better (UPS wise) than a behemoth single network with tens of thousands of bots that have to travel across all the map : less robots, less roboports, ...
I also didn't mention the power generation. Solar is UPS free. If you run into UPS issues, replacing steam/nuclear with solar is a good way to get more UPS.
Also, I'm not trying to teach you "how the game should be played", if I gave you this impression, I'm sorry for not being clear. It's just general tips "for better UPS". I can understand the "I don't want trains" thing more than you could imagine . but a simple yet efficient train network will be better UPS wise than endless belts with balancers everywhere.
That's exactly it. Actually, they did that in 0.17 *for now*, but this should change. Source here : viewtopic.php?p=424101#p424101
For the remaining of my previous post, most advices were given with the idea that you needed to fix low UPS issues. The pieces of advice I gave are still valid to delay even more the apparition of UPS issues should you keep on building, but you don't need them at the moment.
The "clever" use of bots is indeed "small" (compared to the scale of your base) modular constructions that allow you to minimize belt length, robot pathing calculations, ... and minimize the number of entities needed : Despite the bots being VERY UPS friendly overall, small logistic networks that can operate with a few hundred bots each are better (UPS wise) than a behemoth single network with tens of thousands of bots that have to travel across all the map : less robots, less roboports, ...
I also didn't mention the power generation. Solar is UPS free. If you run into UPS issues, replacing steam/nuclear with solar is a good way to get more UPS.
Also, I'm not trying to teach you "how the game should be played", if I gave you this impression, I'm sorry for not being clear. It's just general tips "for better UPS". I can understand the "I don't want trains" thing more than you could imagine . but a simple yet efficient train network will be better UPS wise than endless belts with balancers everywhere.
Koub - Please consider English is not my native language.
Re: What consumes UPS?
Now that I have the game up, I have some actual numbers instead of just estimates. I was wildly off in terms of laser turrets as I actually have 37k. I counted my mega belt with a deconstruction planner and it comes out to about 10-11k long not counting that I use belts for all of my science production. While I do have a very strong computer, all the credit goes to the devs here. I just loaded the game on my potato laptop and it got a solid 40 UPS when I was zoomed all the way in. With the 1k SPM portion of my base switched on (I just finished it and don't have the mines to feed it for a long period of time) belts only take up 5-6% of the update. I don't have a 1k SPM train base to compare it to, but that seems really well optimized. Messing around with the debug options, it seems that the games merges belts into one long belt (like how the underground belt used to give better performance than normal belts because they covered 8 tiles instead of 1) so length doesn't seem to affect performance.Koub wrote: ↑Tue Apr 23, 2019 5:55 pm Well I assumed that you couldn't achieve 60 UPS, and that was the reason you created this thread. I'm quite impressed being wrong (both by the devs who can get such an optimized game, and your computer, that must be quite beefy, you wouldn't run that on a potato ).
As for nuclear power, my total fluids take less than 2% of the update. I wouldn't imagine that switching to solar would help much since I have some very messy pipes that are probably taking up most of the fluid tick.
I never thought you were. Besides, I came here looking for tips. Why would I ask for advice and then throw it away because I didn't like the way it was presented?Koub wrote: ↑Tue Apr 23, 2019 5:55 pm Also, I'm not trying to teach you "how the game should be played", if I gave you this impression, I'm sorry for not being clear. It's just general tips "for better UPS". I can understand the "I don't want trains" thing more than you could imagine . but a simple yet efficient train network will be better UPS wise than endless belts with balancers everywhere.
Good things come in bags marked "SWAG"
Re: What consumes UPS?
Entities!:)
Normal/High UPS:
-active Inserters, chests, assemblers, aliens, fish(rumor)
-all non-saturated belts; splitters, sideloaders
-active pipes
-every active chunk on the map
low/very low UPS
-beacons, solar panels, accumulators
Normal/High UPS:
-active Inserters, chests, assemblers, aliens, fish(rumor)
-all non-saturated belts; splitters, sideloaders
-active pipes
-every active chunk on the map
low/very low UPS
-beacons, solar panels, accumulators
Re: What consumes UPS?
Fully compressed belts have better performance than non compressed belts? I guess that makes sense. I don't believe that fish consume much. I noticed that if you look at fish far away with a radar, you will see that they don't move at all and only start moving when the player gets close.
Good things come in bags marked "SWAG"
Re: What consumes UPS?
Belts description is misleading I think.E-37 wrote: ↑Wed Apr 24, 2019 8:58 pmFully compressed belts have better performance than non compressed belts? I guess that makes sense. I don't believe that fish consume much. I noticed that if you look at fish far away with a radar, you will see that they don't move at all and only start moving when the player gets close.
Belt that is full and not moving might be better for performance since it's not working. I'm not sure if it has been tested enough to see if difference is meaningfull.
Re: What consumes UPS?
You can test the performance with fish: just make this code on the see
Or with 100, 1000 fishes etc.
Code: Select all
/c local player = game.player
local surface = player.surface
for i = 1, 10 do
local position = surface.find_non_colliding_position('fish', player.position, 10, 1)
if not position then return end
surface.create_entity {name = 'fish', position = position}
end
Re: What consumes UPS?
I spawned in about 2000 fish and I didn't have any drop in UPS.
Good things come in bags marked "SWAG"
Re: What consumes UPS?
I've made the map 300x300 tiles, game speed 5000.
Lower UPS was about 10 000, highest UPS was about 200 000. After placing of 2000 fishes, it was UPS 4000 / 180 000.
-
- Long Handed Inserter
- Posts: 94
- Joined: Fri Mar 01, 2019 7:56 am
- Contact:
Re: What consumes UPS?
Related to this I have a question about large chests and/or warehouses.
I understand large warehouses and chests have an impact on UPS when inserting/taking out, does limiting the chest or warehouse help with this in any way? I know wooden chests are good for passing items in between with a chest buffer, but would an iron chest limited to 1 stack perform just as well as a wooden chest limited to 1 stack ?
I understand large warehouses and chests have an impact on UPS when inserting/taking out, does limiting the chest or warehouse help with this in any way? I know wooden chests are good for passing items in between with a chest buffer, but would an iron chest limited to 1 stack perform just as well as a wooden chest limited to 1 stack ?
Re: What consumes UPS?
What is UPS unfriendly with large warehouses is that every time an inserter wants to ... insert something in a container, it has to cycle through all the slots to see it there is room in that slot for the given item.
The source with a lot of details here : viewtopic.php?p=128592#p128592 (and the following posts).
The source with a lot of details here : viewtopic.php?p=128592#p128592 (and the following posts).
Koub - Please consider English is not my native language.
-
- Long Handed Inserter
- Posts: 94
- Joined: Fri Mar 01, 2019 7:56 am
- Contact:
Re: What consumes UPS?
oh, I see, and does this loop take an early exit when it encounters an X? Since then by definition no following slot can accept the item either.
Re: What consumes UPS?
So. If we trying to insert 3 items of coal to chest with coal, it tries to insert it to every slot, from first one?Koub wrote: ↑Sat Apr 27, 2019 7:09 am What is UPS unfriendly with large warehouses is that every time an inserter wants to ... insert something in a container, it has to cycle through all the slots to see it there is room in that slot for the given item.
The source with a lot of details here : viewtopic.php?p=128592#p128592 (and the following posts).
It looks like some infinity chest can have better performance just with inventory[stack.name] = inventory[stack.name] + stack.amount, without checking if we have place for it.
Re: What consumes UPS?
There is a guy, mulark, who has done a lot of UPS testing and benchmarking.
He has a website with his test results, very nice read. It should answer a lot of your questions.
I only found out about his site a few days ago when reading randomly on factorio discord.
I hope it is ok if I link it:
https://mulark.github.io/index.html
He has a website with his test results, very nice read. It should answer a lot of your questions.
I only found out about his site a few days ago when reading randomly on factorio discord.
I hope it is ok if I link it:
https://mulark.github.io/index.html
Re: What consumes UPS?
Seems to me that an appropriate optimization would be to do away with the notion of inventory slots and item stack size and replace it with volume and/or weight properties - that way it can use a simple numeric comparison to determine if something can fit and would only ever have to iterate through as many entries in a chest as there are types of items.Koub wrote: ↑Sat Apr 27, 2019 7:09 am What is UPS unfriendly with large warehouses is that every time an inserter wants to ... insert something in a container, it has to cycle through all the slots to see it there is room in that slot for the given item.
The source with a lot of details here : viewtopic.php?p=128592#p128592 (and the following posts).
Re: What consumes UPS?
My intuition tells me that this "simple" change would have way more side effects on the rest of the game. Like the player's inventory for example.
Koub - Please consider English is not my native language.