Is nuclear power really bad for megabases?

Power Plants, Energy Storage and Reliable Energy Supply. All about efficient energy production. Turning parts of your factory off. Reliable and self-repairing energy.
causa-sui
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Sep 12, 2020 4:23 am
Contact:

Is nuclear power really bad for megabases?

Post by causa-sui »

Conventional wisdom is that big bases need to use solar power, because nuclear power needs to move steam and heat around, and fluid calculations are expensive -- whereas a solar array of unlimited size only requires a single calculation. In "Big O" terms, Nuclear is at best O(n) while Solar is O(1). Therefore, Solar is preferable at large scale.

However, it's not quite that cut and dried. How big do you have to get before the performance impact of nuclear power is actually relevant on a decent PC? I decided to do some testing.

Notes:

- Factorio version 1.1
- Fluid calculations received a big update in 0.18 as described in Friday Facts #260, #271, and #274 (and probably others - let me know).
- Since the name of the game is UPS, I am not concerned with steam buffering or anything else having to do with efficiency of fuel consumption.
- Other than the above, I made no special effort to find the most UPS-optimized blueprint out there. It should be possible to beat these numbers.

Code: Select all

OS: Arch Linux x86_64 
CPU: Intel i7-9750H (12) @ 4.5GHz [56.0°on] 
GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q 
Memory: 4.10GiB / 15.48GiB 
I made a blueprint using Editor Extensions mod that feeds nuclear fuel cells from infinity storage chests and empties depleted fuel into infinity storage chests. Then I tiled it to 1000 reactors:

Image

To ensure all turbines are working, I used an infinity accumulator on input mode with tertiary priority. The system produces 168GW of power:

Image


Image

Finally, I ran benchmarks on the save:

Code: Select all

  Performed 1000 updates in 11759.384 ms
  avg: 11.759 ms, min: 10.068 ms, max: 26.914 ms
  checksum: 341987715
  15.962 Goodbye
I've also attached the save in case anyone else wants to try to replicate my results.

What do you think? Do these results confirm the popular wisdom or is this myth busted?
Attachments
test_nuclear_madness.zip
(60.61 MiB) Downloaded 135 times
Last edited by causa-sui on Thu Jan 27, 2022 4:20 pm, edited 1 time in total.

mmmPI
Smart Inserter
Smart Inserter
Posts: 1661
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by mmmPI »

I think the test could be made comparative with an array of solar pannel/Accu producing also 168GW fully consumed through several cycle of night and day, otherwise it's hard to get the entranched ideas out of my head :)

Also have you tried to shoot a reactor when it's 999° and you have a 1000 of them ? Conventional wisdom doesn't recommend doing it but it would be interesting to know if the melting of the reactor would also melt the GPU or the CPU. This cannot happens with solar !

More serious parameter than may comes into play when comparing the ups efficiency, cases of brown-out and power variatio/starvation i think it can happen that one or the other has a significant enough impact to be noticeable. If you only test isolated power source, you do not measure the ups impact it has on machines. I'm thinking about a base that would consists mostly of beacons, an entity that would be more costly in ups when out of power very often maybe would be more suited with the least ups efficient option in normal time because more consistent.

(example : 100 ms vs 120 ms required when consumption = demand in favor of solar but maybe 150 ms vs 140 ms when power starved at the end of the night, in favor of nuclear this time , just because it's more stable and your base is full of beacon )

I still have the experience of making ridiculously big reactors and noticing my ups going down faster than when using solar pannel in general , but was it because my nuclear reactor where very poorly design ?

Instead of comparing with solar pannel ( since it's not fair they will win imo ) one could try to compare with another nuclear blueprint :)

causa-sui
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Sep 12, 2020 4:23 am
Contact:

Re: Is nuclear power really bad for megabases?

Post by causa-sui »

To clarify, I am not challenging the fact that Solar is O(1) while Nuclear is at best O(n), and so the UPS impact of Solar will always be negligible. Solar will ALWAYS outperform Nuclear at any quantity of output, and the bigger the output, the bigger the performance gap will be.

However, Nuclear is easier to deploy than Solar at large scale.

Therefore, what I'm investigating is what the baseline/minimum UPS cost of running a huge nuclear installation in a practical situation might be, so that I can make more informed decisions about whether the performance impact is actually big enough to justify the extra work of doing solar instead.

"Worth it" is slippery and subjective so I aim to present data and let others decide for themselves whether it crosses the threshold.

Perhaps the right comparison to Solar wouldn't be in terms of UPS, but in terms of space occupied on the map, the number of structures that must be placed, and/or the resources consumed in making the structures.

Edit: If it would help, I could deconstruct everything, place one panel, one accumulator, and an infinity accumulator to consume their power, and benchmark that... I guess it would be like doing a Tare on a physical scale.

SoShootMe
Filter Inserter
Filter Inserter
Posts: 299
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by SoShootMe »

causa-sui wrote:
Thu Jan 27, 2022 4:56 pm
However, Nuclear is easier to deploy than Solar at large scale.
...
"Worth it" is slippery and subjective so I aim to present data and let others decide for themselves whether it crosses the threshold.

Perhaps the right comparison to Solar wouldn't be in terms of UPS, but in terms of space occupied on the map, the number of structures that must be placed, and/or the resources consumed in making the structures.
OK, some numbers for power density, number of entities to place and resources to build (3sf, resource costs with full productivity at 1 for mined, 0.1 for crude oil, 0 for water), hopefully without errors...
Workings
Solar: 3.36kW/tile, 22.4kW/entity, 782W/resource.
Nuclear: 230kW/tile, 213kW/entity (or landfill tile), 6.58kW/resource.

Roughly, at scale, that means nuclear has 70 times greater power density, requires 1/10 the number of entities/tiles to be placed, and is 8 times cheaper to build. It's not the whole picture, but I think about as close as you can get to quantifying "Nuclear is easier to deploy than Solar at large scale."

The other part of the picture is "How much UPS would I sacrifice by using nuclear instead of solar?" The best idea I can come up with is to take a factory with a given SPM and benchmark with appropriately-sized power production both ways. From your benchmark I'd guess 10-20% depending on how UPS-optimised the factory is and whether pollution and/or biters are enabled. But I could be way off...

mmmPI
Smart Inserter
Smart Inserter
Posts: 1661
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by mmmPI »

causa-sui wrote:
Thu Jan 27, 2022 4:56 pm
Therefore, what I'm investigating is what the baseline/minimum UPS cost of running a huge nuclear installation in a practical situation might be, so that I can make more informed decisions about whether the performance impact is actually big enough to justify the extra work of doing solar instead.

"Worth it" is slippery and subjective so I aim to present data and let others decide for themselves whether it crosses the threshold.

Perhaps the right comparison to Solar wouldn't be in terms of UPS, but in terms of space occupied on the map, the number of structures that must be placed, and/or the resources consumed in making the structures.

Edit: If it would help, I could deconstruct everything, place one panel, one accumulator, and an infinity accumulator to consume their power, and benchmark that... I guess it would be like doing a Tare on a physical scale.
That makes sense to me, If you consider the Tare on a physical scale as 1 solar and 1 accumulator then you can compare two things. Even though it seem one is not important to measure. Or is almost 0. It is required for rules of 3 :D

Plus maybe the space required to lay down all solar pannels complicate the pollution spread calculation, or require a larger perimeter outside of revealed chunk which host more biters which each of them will require a longer path to reach target and so on. So maybe the use of solar even if O(1) for pure electric consumption still has some scaling in terms of time machine costs due to some parameters such as those you mentionned.

I appreaciate the idea of providing data and avoiding subjectivity for the purpose of the comparaison.

I'm not quite sure how test relate to real condition in this context though.

It would be nice if there was a way to easily isolate in the benchmark the time machine required only for the power source calculation. Testing in isolation the power source can give some information about the cost in ups/time machine required for X amount of power using nuclear. Which allows to somewhat extract the information from an existing nuclear megaase. but then maybe it need to be tested against the solar pannel and accumulator on the map plus their production line running. Considering that in real game those production line would run almost continuously for solar, while almost never except at the start and then occasionnal short time for nuclear.

The choice of the comparaison is arbitrary but the data would be objective and meaningfull :)

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1388
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by ptx0 »

Dominik never finished that fluid rework, it was not released. there's been no major change in the performance of fluids, other than being removed from the main update thread, offloaded into their own update thread. a side effect of this is that it made ElectricNetwork updates take longer. in effect, threading the fluid network just shifted the time consumed.

but fluids aren't the only aspect of reactors that consume UPS. that would be the HeatManager and particles rendered by the steam output of the turbines. Heat pipes have not received any recent optimizations.

even on a PC, having nuclear is more expensive than not having it. you cannot build as large while maintaining 60 UPS. but maintaining 60 UPS isn't everything.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1388
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by ptx0 »

causa-sui wrote:
Thu Jan 27, 2022 4:56 pm
However, Nuclear is easier to deploy than Solar at large scale.
lol? you need kovarex enrichment to make a certain number of U232 before you can make a nuclear cell.

nuclear cells require recycling infrastructure or else they just pile up forever.

you have to work at designing a reactor if you want it to use the fewest number of pipes/heat-pipes/heat-exchanger/reactors. water input is quite a challenge. getting maximum neighbour bonus is also a challenge.

solar is pretty much set and forget. the memory consumed by each accumulator or solar panel existing on the map is lower per-entity than the memory consumed by each reactor / heat-exchanger etc entities.

basically, what i'm trying to say, is just because your map is huge and weighs 300MiB, doesn't mean it'll perform worse.
causa-sui wrote:
Thu Jan 27, 2022 4:56 pm
Therefore, what I'm investigating is what the baseline/minimum UPS cost of running a huge nuclear installation in a practical situation might be, so that I can make more informed decisions about whether the performance impact is actually big enough to justify the extra work of doing solar instead.

"Worth it" is slippery and subjective so I aim to present data and let others decide for themselves whether it crosses the threshold.

Perhaps the right comparison to Solar wouldn't be in terms of UPS, but in terms of space occupied on the map, the number of structures that must be placed, and/or the resources consumed in making the structures.

Edit: If it would help, I could deconstruct everything, place one panel, one accumulator, and an infinity accumulator to consume their power, and benchmark that... I guess it would be like doing a Tare on a physical scale.
A single electric energy interface consumes a few ticks more CPU than 1.8 million actual accumulators, probably because the EEI never goes to sleep.

gGeorg
Filter Inserter
Filter Inserter
Posts: 304
Joined: Wed Jun 19, 2019 8:06 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by gGeorg »

Idea of compare real impact of Nuclear vs solar is interesting. However, the first post made just one leg of compare.
And the leg is somewhat broken.
As someone said, it better should be the real base with all the infrastructure.
So the final result should be like
" Solar is more CPU friendly, it allows you produce 3000 science more than Nuclear with the same UPS."

SoShootMe
Filter Inserter
Filter Inserter
Posts: 299
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by SoShootMe »

ptx0 wrote:
Fri Jan 28, 2022 6:34 pm
causa-sui wrote:
Thu Jan 27, 2022 4:56 pm
However, Nuclear is easier to deploy than Solar at large scale.
lol? you need kovarex enrichment to make a certain number of U232 before you can make a nuclear cell.

nuclear cells require recycling infrastructure or else they just pile up forever.

you have to work at designing a reactor if you want it to use the fewest number of pipes/heat-pipes/heat-exchanger/reactors. water input is quite a challenge. getting maximum neighbour bonus is also a challenge.
Nobody is saying that nuclear power infrastructure, including the fuel cell chains to keep it running, isn't more complex than that for solar, but you only have to design once (...disregarding the constant desire to "improve" designs). Solar presents a different challenge, at least partially to be solved by design: how to expand power production at a reasonable rate.

The claim is about deployment: at large scale, it's "more of the same" for both, but solar needs massively more land to be claimed (though game settings greatly affect the significance of this), far more entities to be placed, and far more resources devoted to building them.
the memory consumed by each accumulator or solar panel existing on the map is lower per-entity than the memory consumed by each reactor / heat-exchanger etc entities.

basically, what i'm trying to say, is just because your map is huge and weighs 300MiB, doesn't mean it'll perform worse.
Additional per-entity memory for nuclear power parts is surely outweighed by additional entities and more map chunks with solar, as your second sentence seems to suggest. In other words, you seem to be suggesting that solar in fact does perform worse in terms of memory and save size (and hence save or map download time).

Better UPS seems to be the only thing solar has really got going for it over nuclear. The (partly subjective, partly dependent on other factors) conclusion of whether that's worth it is exactly the point of this thread.

coppercoil
Filter Inserter
Filter Inserter
Posts: 390
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: Is nuclear power really bad for megabases?

Post by coppercoil »

Players have different motivation, I'm not sure if it is worth arguing about that. Personally, I use nuclear, because solar is too simple, it's boring, it's for kids. Please don't say I'm wrong, this is how I play. But I still want UPS, so gGeorg asked right question. I'd like to hear an answer like "using nuclear power you will produce 30% less SPM for the same UPS".

causa-sui
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Sep 12, 2020 4:23 am
Contact:

Re: Is nuclear power really bad for megabases?

Post by causa-sui »

coppercoil wrote:
Sat Jan 29, 2022 9:05 am
Players have different motivation, I'm not sure if it is worth arguing about that.
In no way am I arguing that anyone should not use Solar if it suits their purposes.

I just CANNOT emphasize this enough.

However, I do think that the often-repeated mantra that "if you are building a megabase, you MUST use solar, because Nuclear WILL kill your UPS" is far too black and white and inflexible. This is a decision that should be made by each engineer knowing their own goals, map settings, and other contextual details, and giving people DATA is the best way to help and inform that decision.

causa-sui
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Sep 12, 2020 4:23 am
Contact:

Re: Is nuclear power really bad for megabases?

Post by causa-sui »

gGeorg wrote:
Sat Jan 29, 2022 7:03 am
As someone said, it better should be the real base with all the infrastructure.
I disagree. This would introduce a variable: a reader might object "well, yeah, but that's what it did with YOUR base, maybe the impact will be different on MY base because of XYZ."

I've recently discovered FactorioBox and I'll be repeating my experiments with that for more controlled analysis, though.

causa-sui
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Sep 12, 2020 4:23 am
Contact:

Re: Is nuclear power really bad for megabases?

Post by causa-sui »

SoShootMe wrote:
Sat Jan 29, 2022 7:25 am
Nobody is saying that nuclear power infrastructure, including the fuel cell chains to keep it running, isn't more complex than that for solar, but you only have to design once (...disregarding the constant desire to "improve" designs). Solar presents a different challenge, at least partially to be solved by design: how to expand power production at a reasonable rate.

The claim is about deployment: at large scale, it's "more of the same" for both, but solar needs massively more land to be claimed (though game settings greatly affect the significance of this), far more entities to be placed, and far more resources devoted to building them.
I couldn't have said it better myself. Kovarex and nuclear power are solved problems for many players. I have my own blueprints that I can simply stamp down.

gGeorg
Filter Inserter
Filter Inserter
Posts: 304
Joined: Wed Jun 19, 2019 8:06 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by gGeorg »

causa-sui wrote:
Sat Jan 29, 2022 4:01 pm
gGeorg wrote:
Sat Jan 29, 2022 7:03 am
However, the first post made just one leg of compare.
And the leg is somewhat broken.
The final result should be like
" Solar is more CPU friendly, it allows you produce 3000 science more than Nuclear with the same UPS."
As someone said, it better should be the real base with all the infrastructure.
I disagree. This would introduce a variable: a reader might object "well, yeah, but that's what it did with YOUR base, maybe the impact will be different on MY base because of XYZ."

I've recently discovered FactorioBox and I'll be repeating my experiments with that for more controlled analysis, though.
When you try compare two things, it is better to actually measure two things. :-)
Although previous sentence sounds stupid, it is "common sense" do compare of the one thing only. All advertising do that every day. Simply show you the better car,soda,perfume. Well, a product better than ... what ?

I understand, that your idea is highlit data, that with nuclear you can build very decent mega.
I understand, that you idea is clearly inform other what cost Nuclear has comapared to Solar.

If you are going this way, well you certainly get attention. Here is another thing to consider in comparation.
Nuclears has several design schools. But most important, regarding UPS, is fact that one Nuclear (steam flow, thermal flow) has two compute intense threads. Yes, it was confirmed by devs that each nuclear could run in very own compute thread.
viewtopic.php?p=535971#p535971
Does it means, with an AMD Epic processor your hit to UPS can be close to zero, because of many core (No of CPU cores somewhat correspond to No. of Nuclear plants) design ?
Does it means, the popular 2(n) endless design Nuclear is true killer of UPS by overloading one compute thread ?

Interesting qestions, who know the answear ?

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1388
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by ptx0 »

SoShootMe wrote:
Sat Jan 29, 2022 7:25 am
Additional per-entity memory for nuclear power parts is surely outweighed by additional entities and more map chunks with solar, as your second sentence seems to suggest. In other words, you seem to be suggesting that solar in fact does perform worse in terms of memory and save size (and hence save or map download time).

Better UPS seems to be the only thing solar has really got going for it over nuclear. The (partly subjective, partly dependent on other factors) conclusion of whether that's worth it is exactly the point of this thread.
uhm nope, i kinda said that the nuclear's CPU overhead is worse than the memory used by solar, and that the per-entity memory use of solar is lower, meaning, you can put a vastly greater number of them.

also as i noted, a couple million solar panels performs BETTER than a single electric energy interface.

as for the rest of what you said, it's like you ignored everything i was saying about how it requires more build & design. you hand waved it away, idk. you have a bias against solar?

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1388
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by ptx0 »

causa-sui wrote:
Sat Jan 29, 2022 4:36 pm
SoShootMe wrote:
Sat Jan 29, 2022 7:25 am
Nobody is saying that nuclear power infrastructure, including the fuel cell chains to keep it running, isn't more complex than that for solar, but you only have to design once (...disregarding the constant desire to "improve" designs). Solar presents a different challenge, at least partially to be solved by design: how to expand power production at a reasonable rate.

The claim is about deployment: at large scale, it's "more of the same" for both, but solar needs massively more land to be claimed (though game settings greatly affect the significance of this), far more entities to be placed, and far more resources devoted to building them.
I couldn't have said it better myself. Kovarex and nuclear power are solved problems for many players. I have my own blueprints that I can simply stamp down.
if you're just going to keep shifting the goal post, then let me answer your question differently: whatever you want to do to have fun is the best way for you to play.

if using previously-built blueprints is a part of this, well, solar design and build and expansion are "solved problems" too, and can be done in far less time than it takes to do kovarex enrichment. it requires less power overhead on an ongoing basis. those centrifuges aren't free.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1388
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by ptx0 »

reminder of the initial question:
What do you think? Do these results confirm the popular wisdom or is this myth busted?
and my answer is, no. nothing changes. solar is still better for megabases. you won't convince me otherwise. you asked our thoughts. that's all.

User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1397
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by jodokus31 »

Nuclear is not as bad as it was.
But, if you just look at the "finished" bases and compare them, one driven by solar, the other by nuclear, I would say, that solar is performing better, because the calculation is just simple and nuclear is more complex.

However, if you also consider the building phase: resource cost, expansion and how long it takes to get to the "finished" base, you might want to go with nuclear and accept the running CPU cost.

SoShootMe
Filter Inserter
Filter Inserter
Posts: 299
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Is nuclear power really bad for megabases?

Post by SoShootMe »

I got around to doing some "worst case" benchmarks. I used Stevetrov's UPS-optimised design to create a 1k SPM "load", with infinity chests/pipes for ore/oil/water. After stabilising at 1k SPM for an hour, I benchmarked saves for a further hour (216k ticks) researching Mining productivity.

The best (= least affected by outside factors) average UPS results from three runs for each power source on my aged PC (i5-4690):

Electric energy interface: 1916
Solar panels/Accumulators (19x 8000 panels and 6720 accumulators): 1938
Nuclear (3x blueprint below, stacked): 979

There's no practical difference between EEI and solar, and in round terms, nuclear power resulted in a 50% reduction in UPS. In a "real" game - including mining etc and transporting items, and less UPS-optimised production - the reduction would clearly be less. That is, solar could let you build up to twice as big before UPS starts to drop, but most likely significantly less than that. Moreover, going back to the original post:
causa-sui wrote:
Wed Jan 26, 2022 11:51 pm
How big do you have to get before the performance impact of nuclear power is actually relevant on a decent PC?
The absolute numbers above are relevant to answering this, and they say "well into megabase territory". UPS becomes a reason to prefer solar only for large megabases: until then, the time required for nuclear power processing is small, even if it is similar in magnitude to that for other processing.

The nuclear blueprint (untested for UPS efficiency relative to other designs):

coppercoil
Filter Inserter
Filter Inserter
Posts: 390
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: Is nuclear power really bad for megabases?

Post by coppercoil »

SoShootMe wrote:
Wed Feb 02, 2022 7:12 am
In a "real" game - including mining etc and transporting items, and less UPS-optimised production - the reduction would clearly be less.
I took my real 430 SPM factory and replaced 3.8 GW nuclear power to electric energy interface.
Nuclear: 320 UPS.
Electric interface: 380 UPS.
Looks good.

Post Reply

Return to “Energy Production”