Page 1 of 1
Headless Server - More cores?
Posted: Sat Jan 14, 2017 9:35 pm
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.
Re: Headless Server - More cores?
Posted: Sat Jan 14, 2017 10:21 pm
by prg
It's not a matter of simply allowing the game to use more cores. Parallelizing algorithms is not trivial.
Re: Headless Server - More cores?
Posted: Sun Jan 15, 2017 12:05 am
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.
Re: Headless Server - More cores?
Posted: Tue Jan 17, 2017 2:00 pm
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?
Re: Headless Server - More cores?
Posted: Tue Jan 17, 2017 8:35 pm
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.
Re: Headless Server - More cores?
Posted: Wed Sep 13, 2017 2:48 am
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.
Re: Headless Server - More cores?
Posted: Thu Sep 14, 2017 11:02 am
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).