Page 1 of 1
Does Factorio use multiple cpu cores?
Posted: Sat Jan 03, 2015 12:09 pm
by Xabi
i googled it but i wasnt able to find anything related to this topic (sorry if repost^^).
So I just wanted to know:
Does Factorio use multiple cpu cores?
Re: Does Factorio use multiple cpu cores?
Posted: Sat Jan 03, 2015 12:14 pm
by zekesonxx
Yes.
Re: Does Factorio use multiple cpu cores?
Posted: Sat Jan 03, 2015 12:36 pm
by Xabi
thanks^^
Re: Does Factorio use multiple cpu cores?
Posted: Sat Jan 03, 2015 1:46 pm
by kovarex
Yes, but in a limited way.
- It uses separate threads when preparing the render data.
- It uses separate thread for render and game update.
- It uses separate thread for map generation.
But the game logic (which is the most limited factor) runs in single thread, so when your factory gets really big it will start to lag while your other cores will not be utilitised fully.
We will probably split the game logic into multi threaded algorithm someday, but it is not as easy
Re: Does Factorio use multiple cpu cores?
Posted: Sat Jan 03, 2015 6:26 pm
by Xterminator
Thanks for the explanation Kovarex! Obviously the question is already answered, but I would just like to say how impressed I am with the optimization of the game even at this point. Considering how many moving parts there are in Factorio, it is pretty amazing to me how little it legs even without fully utilizing all processor cores.
Re: Does Factorio use multiple cpu cores?
Posted: Sat Jan 03, 2015 7:33 pm
by Xabi
thanks for the detailed answer. i know, its not that easy to program multi threading, but i think you guys can do it
. It would be very future-oriented, because we will get in the next years cpu's with 16+ core's. Thats a lot of potential
Re: Does Factorio use multiple cpu cores?
Posted: Mon Jan 05, 2015 7:38 am
by Sisaroth
I personally haven't had performance problems yet, i played for around 50 hours now. First game 30 hours. Now 20 hours in second game. I played a bit with task manager visible and the game was using just 8% max on my i7 2700k. So it wasn't even maximizing 1 core even though i had a pretty big factory.
Re: Does Factorio use multiple cpu cores?
Posted: Mon Jan 05, 2015 11:25 am
by Choumiko
Sisaroth wrote:I played a bit with task manager visible and the game was using just 8% max on my i7 2700k. So it wasn't even maximizing 1 core even though i had a pretty big factory.
Then it's not big enough i guess
In the Bug reports forum are some savegames which run at 7fps, but i haven't got there yet either
Re: Does Factorio use multiple cpu cores?
Posted: Mon Jan 05, 2015 5:55 pm
by kovarex
Well, in multiplayer, the factory can grow much faster. And it also depends on the play style.
Re: Does Factorio use multiple cpu cores?
Posted: Mon Jan 05, 2015 6:24 pm
by DRBLN
kovarex,
I have a very powerful CPU.
But sometime I play MP with people, who don't have that powerful PC.
In case we build a huge factory, some players may start lagging.
Will I lag, as other players have low performance?
Re: Does Factorio use multiple cpu cores?
Posted: Mon Jan 05, 2015 6:37 pm
by kovarex
DRBLN wrote:kovarex,
I have a very powerful CPU.
But sometime I play MP with people, who don't have that powerful PC.
In case we build a huge factory, some players may start lagging.
Will I lag, as other players have low performance?
Yes, all the players need to simulate the factory, so if they struggle to simulate it on full speed, the game is slowed down.
This is also important thing about the optimisations, that it lowers the bar of requirements on the cpu.