Factorio

Factorio

View Stats:
WastedMerc Jun 11, 2017 @ 10:48pm
headless server uses only 1 of 2 cores
I uderstand the main loop is single threaded, but I read small ancilary parts where thredaed
I currently run a massive map and the application maxes out at 100% cpu on a single core while the other core is 100% idle. Is this the expected result?

top - 15:49:32 up 1 day, 22:30, 1 user, load average: 0.99, 0.98, 0.93
Tasks: 85 total, 3 running, 82 sleeping, 0 stopped, 0 zombie
%Cpu0 :100.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3882288 total, 709200 free, 2226356 used, 946732 buff/cache
KiB Swap: 511996 total, 511996 free, 0 used. 1444980 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2786 factorio 20 0 2401552 2.009g 12392 R 100.0 54.3 2578:11 factorio
1 root 20 0 123020 3612 2400 S 0.0 0.1 0:12.57 systemd
Last edited by WastedMerc; Jun 11, 2017 @ 10:49pm
< >
Showing 1-3 of 3 comments
IamNic Jun 12, 2017 @ 10:47am 
IIRC Factorio doesn't yet support hyperthreading.
obstructor Jun 13, 2017 @ 2:00am 
They have experimented with threading it and with how much data factorio munches through it always gets stuck on the memory bus before the cores actually max out on the threads.

I don't know what all this random data you dumped at us means, but I am guessing it either means your server has a great memory bus and you are the .1% factorio isn't optimizing for, or your server is maxing out the memory bus and that is what it means by 100% usage.

Who knows, you would have to go make some serious argument to the devs with stats and data tracking to get them to work on threading again. Seeing as intel/amd are expanding the memory bus on new cpus (seeing as we can't really seem to get them going much faster) you may have a good argument.

Also the ancilary parts that are threaded... they mean less and less the larger your factory is. So they probably don't even blip your other core if your map is massive.
Last edited by obstructor; Jun 13, 2017 @ 2:06am
daniel0674 Jun 13, 2017 @ 5:23am 
Originally posted by WastedMerc:
I uderstand the main loop is single threaded, but I read small ancilary parts where thredaed
I currently run a massive map and the application maxes out at 100% cpu on a single core while the other core is 100% idle. Is this the expected result?
It is expected for a headless server. Some parts in Factorio run on different threads from the main loop, but they mostly do audio/video/render processing which doesn't happen on a headless server.

Just to be sure you can check max-threads in the config/config.ini file, the default value is 4.
Last edited by daniel0674; Jun 13, 2017 @ 5:25am
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Jun 11, 2017 @ 10:48pm
Posts: 3