Does Factorio use multiple cpu cores?

Post all other topics which do not belong to any other category.
User avatar
Xabi
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Jul 27, 2014 10:22 am
Contact:

Does Factorio use multiple cpu cores?

Post 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?
zekesonxx
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Nov 05, 2014 2:50 am
Contact:

Re: Does Factorio use multiple cpu cores?

Post by zekesonxx »

Yes.
User avatar
Xabi
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Jul 27, 2014 10:22 am
Contact:

Re: Does Factorio use multiple cpu cores?

Post by Xabi »

thanks^^
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Does Factorio use multiple cpu cores?

Post 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 :)
User avatar
Xterminator
Filter Inserter
Filter Inserter
Posts: 981
Joined: Sun Jun 15, 2014 4:49 pm
Contact:

Re: Does Factorio use multiple cpu cores?

Post 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. :D
Image Image Image
User avatar
Xabi
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Jul 27, 2014 10:22 am
Contact:

Re: Does Factorio use multiple cpu cores?

Post 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
Sisaroth
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Jan 05, 2015 7:34 am
Contact:

Re: Does Factorio use multiple cpu cores?

Post 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.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: Does Factorio use multiple cpu cores?

Post 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 :D In the Bug reports forum are some savegames which run at 7fps, but i haven't got there yet either ;)
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Does Factorio use multiple cpu cores?

Post by kovarex »

Well, in multiplayer, the factory can grow much faster. And it also depends on the play style.
DRBLN
Filter Inserter
Filter Inserter
Posts: 411
Joined: Sat Mar 23, 2013 12:44 pm
Contact:

Re: Does Factorio use multiple cpu cores?

Post 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?
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Does Factorio use multiple cpu cores?

Post 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.
Post Reply

Return to “General discussion”