Factorio

Factorio

View Stats:
Ryan Sep 19, 2024 @ 7:56pm
Will Space Age be CPU multi-threaded?
I know they spent a ton of time optimizing the game for the single-threaded CPU but mega bases lag big time end game.

Are they able to run the other planets on different CPU cores for greater optimization?
Originally posted by knighttemplar1960:
Most of the game's processes go through a single core, only a few things are multi-threaded. As far as is more going to become multi-threaded, the answer is yes.
https://www.factorio.com/blog/post/fff-421
Go down to boskid's section for the additional multi-threading information.
< >
Showing 1-15 of 15 comments
Khaylain Sep 19, 2024 @ 8:08pm 
The overhead on trying to make it more multithreaded than it already is ended up performing worse than the amount of multithreading they have, so there won't be any further multithreading than Factorio already does, I'm fairly certain.
You can look through their forum for several topics discussing it back and forth and why it's not worth the trouble.

If the game wasn't explicitly deterministic in all gamplay elements it would be easier to multithread it more (and thus they would've already done so), but as it is they've multithreaded what they deem reasonable to multithread without adding more and new problems.
Strategic Sage Sep 19, 2024 @ 8:17pm 
Also worth mentioning that mega bases will always lag, no matter how good performance is. The only question is what point they start lagging at.
Taehl Sep 19, 2024 @ 10:14pm 
IIRC, the game already is multi-threaded to an extent.

It's not as simple as "use more cores and the game runs faster". Each core you use needs to be carefully synchronized in a dance where each step only lasts a fraction of a second. They all need to carefully take turns accessing memory in such a way that it doesn't mess each other up. If they aren't synchronized everything falls apart, and the more cores you try to use the harder it is to keep them all in lock-step. You reach a point where trying to keep them all synchronized is a bigger performance hit than just using fewer cores.

Factorio devs basically reached that point already, so "use more cores!" isn't conducive.
The author of this thread has indicated that this post answers the original topic.
knighttemplar1960 Sep 19, 2024 @ 11:12pm 
Most of the game's processes go through a single core, only a few things are multi-threaded. As far as is more going to become multi-threaded, the answer is yes.
https://www.factorio.com/blog/post/fff-421
Go down to boskid's section for the additional multi-threading information.
TSP Sep 19, 2024 @ 11:32pm 
Originally posted by Ryan:
I know they spent a ton of time optimizing the game for the single-threaded CPU but mega bases lag big time end game.

Are they able to run the other planets on different CPU cores for greater optimization?
There have been serious improvements made on performance for 2.0, but none of them are multithreading related. But let's say you load your 40-50 UPS 1.1 megabase save in 2.0, you can (depending a bit on your designs) expect it to run at 60 UPS.

The fluid system got overhauled which will make a really big impact on megabases, and even more so for Space Age, where foundries consume lava to make iron and copper, at serious bonus productivity too, which means you need fewer entities to produce the same result, resulting in further UPS gains. And that's already without Quality in mind.

All of this gets further extended when you can stack items on top of each other on belts, reducing belts needed for the same SPM, meaning again less entities, more UPS.
Cosmoros Sep 20, 2024 @ 3:46am 
Multi thread is really really hard to implement into any application to make it worthwhile.

You can't just go with "lets throw all assemblers to one thread, refineries to another, etc". Firstly it will require creating a lot of overhead between these threads so they can sync and communicate with each other. Transport system has to be able to insert items and players too. Power has to be calculated correctly, etc.

They are much better off by tying to make so machines try to sync up slowly and group up machines on same chunks into a collection of them processing only one while running agroup of those.

Ngl biters will lag the game much less if they implement the group functionality damage for turrets. Sure its not that realistic, but when you use lots of flamethrowers and your UPS dies because of it. You would rather have it than realism.
Willoguns Sep 20, 2024 @ 6:56am 
Factorio is actually more bottlenecked by memory bandwidth!
check out some benchmarks with the Ryzen 7800X3D, it blows every other CPU out of the water for Factorio.
Last edited by Willoguns; Sep 20, 2024 @ 6:56am
Ryan Sep 20, 2024 @ 11:33am 
Thank you everyone for taking the time to answer! It is all very helpful. That blog post was an interesting read. FWIW, years ago I customized my PC for Factorio by buying extra fast RAM based on metrics people had posted online. Our Factorio server is now the bottleneck in our MP games.

All the Intel CPU vulns probably hurt Factorio with the code updates made over the years.
TSP Sep 22, 2024 @ 1:38am 
Yeah, fast ram and an x3d cpu are the best bang for your buck if you want performance for Factorio. Many games benefit the most from an x3d cpu cost/performance wise, but games like factorio even more so. It is very satisfying to get an upgrade like that.
Ragnaman Sep 22, 2024 @ 2:53am 
The biggest optimisation will be the Quality update.
Instead of 200 entities you will need 20 to get same output.
knighttemplar1960 Sep 22, 2024 @ 5:53pm 
Originally posted by Ragnaman:
The biggest optimisation will be the Quality update.
Instead of 200 entities you will need 20 to get same output.
No. According to the FFFs The biggest optimizations will be to the changes to the fluid system and the smarter robots. Most of it is broken down here:
https://www.factorio.com/blog/post/fff-421
Endeavor Sep 27, 2024 @ 9:12am 
Originally posted by Cosmoros:
Multi thread is really really hard to implement into any application to make it worthwhile.

You can't just go with "lets throw all assemblers to one thread, refineries to another, etc". Firstly it will require creating a lot of overhead between these threads so they can sync and communicate with each other. Transport system has to be able to insert items and players too. Power has to be calculated correctly, etc.

They are much better off by tying to make so machines try to sync up slowly and group up machines on same chunks into a collection of them processing only one while running agroup of those.

Ngl biters will lag the game much less if they implement the group functionality damage for turrets. Sure its not that realistic, but when you use lots of flamethrowers and your UPS dies because of it. You would rather have it than realism.

AHahahaha :D how can someone babble this much bs without knowing anything about it, always amazes me.
Cosmoros Sep 27, 2024 @ 3:40pm 
Originally posted by Endeavor:
Originally posted by Cosmoros:
Multi thread is really really hard to implement into any application to make it worthwhile.

You can't just go with "lets throw all assemblers to one thread, refineries to another, etc". Firstly it will require creating a lot of overhead between these threads so they can sync and communicate with each other. Transport system has to be able to insert items and players too. Power has to be calculated correctly, etc.

They are much better off by tying to make so machines try to sync up slowly and group up machines on same chunks into a collection of them processing only one while running agroup of those.

Ngl biters will lag the game much less if they implement the group functionality damage for turrets. Sure its not that realistic, but when you use lots of flamethrowers and your UPS dies because of it. You would rather have it than realism.

AHahahaha :D how can someone babble this much bs without knowing anything about it, always amazes me.

Prove me wrong clown. Make factorio multithreaded without loss of performance.
TheKillerChicken Sep 27, 2024 @ 4:02pm 
Originally posted by Endeavor:
Originally posted by Cosmoros:
Multi thread is really really hard to implement into any application to make it worthwhile.

You can't just go with "lets throw all assemblers to one thread, refineries to another, etc". Firstly it will require creating a lot of overhead between these threads so they can sync and communicate with each other. Transport system has to be able to insert items and players too. Power has to be calculated correctly, etc.

They are much better off by tying to make so machines try to sync up slowly and group up machines on same chunks into a collection of them processing only one while running agroup of those.

Ngl biters will lag the game much less if they implement the group functionality damage for turrets. Sure its not that realistic, but when you use lots of flamethrowers and your UPS dies because of it. You would rather have it than realism.

AHahahaha :D how can someone babble this much bs without knowing anything about it, always amazes me.
You clearly do not understand that SMT is totally useless in a game. Cities Skylines II uses up to 64-cores/threads and it is not even marginally close to what an I7 or ryzen5 can do.
Sahayak Sep 29, 2024 @ 6:07am 
yadda yadda yadaa race conditions don't do well in a MP context, the end.
< >
Showing 1-15 of 15 comments
Per page: 1530 50

Date Posted: Sep 19, 2024 @ 7:56pm
Posts: 15