Headless Server - More cores?

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Tumeden
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Jan 14, 2017 9:23 pm
Contact:

Headless Server - More cores?

Post by Tumeden »

I'm not even entirely sure if this is possible because of how Factorio is coded, but is there a way to allow 'just' the headless server's to use more CPU cores?
A lot of people have some pretty powerful quad core machines - but a big issue i come across is that it's not very powerful with a single core which makes running a server a little more difficult - and not so smooth.
I have a friend who runs a server on a 2.8ghz 8 core machine, and it uses 80% of a single core, which is really unfortunate as there would be huge potential if you could split the processing power between cores.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Headless Server - More cores?

Post by prg »

It's not a matter of simply allowing the game to use more cores. Parallelizing algorithms is not trivial.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Rseding91
Factorio Staff
Factorio Staff
Posts: 14843
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Headless Server - More cores?

Post by Rseding91 »

We don't "limit" the number of threads the game can use. It's simply the *vast* majority of Factorios simulation isn't parellizable and doesn't benefit from multiple threads.
If you want to get ahold of me I'm almost always on Discord.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 736
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: Headless Server - More cores?

Post by DRY411S »

Rseding91 wrote:We don't "limit" the number of threads the game can use. It's simply the *vast* majority of Factorios simulation isn't parellizable and doesn't benefit from multiple threads.
It would be fun to try though, wouldn't it? ;)
Rseding91
Factorio Staff
Factorio Staff
Posts: 14843
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Headless Server - More cores?

Post by Rseding91 »

DRY411S wrote:
Rseding91 wrote:We don't "limit" the number of threads the game can use. It's simply the *vast* majority of Factorios simulation isn't parellizable and doesn't benefit from multiple threads.
It would be fun to try though, wouldn't it? ;)
An attempt was already made which is where I'm getting my information from.
If you want to get ahold of me I'm almost always on Discord.
UnicornsRock
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Aug 15, 2017 6:58 pm
Contact:

Re: Headless Server - More cores?

Post by UnicornsRock »

While as I .Net Developer I grant it's a bit of an architectural paradigm shift to go from a single to a multi-threaded application design. However I do hope performance on the headless server continues to improve and increase over time.

Though it is disappointing that as of current game design/architecture we'll never get the 10 GW Solar power achievement unless we underwent some insane strategic conditions (no bugs - which also means no turrets just to spare the CPU usage). Because our main map hosted on a CentOS VM is so persistently scraping 100% that it's virtually unplayable now. Especially when the bugs send multiple waves at once against the turrets from multiple sides.

[Update] When I say we I mean my friends and I.
Words and Stuff!
Zavian
Smart Inserter
Smart Inserter
Posts: 1650
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Headless Server - More cores?

Post by Zavian »

THe existing thread discussing multi-threading is viewtopic.php?f=5&t=39893 . In particular read this post viewtopic.php?f=5&t=39893&start=60#p238247 from Harkonnen which describes what happened when he worked on multithreading Factorio.

Also if you just multithread the server, then you will quickly end up with a situation where the clients are slower than the server, and are unable to keep up. (Admittedly I expect the simulation part of the code is exactly the same, so I expect multithreading one would be effectively the same as multithreading both).
Post Reply

Return to “Ideas and Suggestions”