Factorio only uses 50% CPU

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Factorio only uses 50% CPU

Post by DaveMcW »

I am playing a huge map, and at times Factorio only runs at 10 FPS. But half of my CPU power is unused. Does Factorio intentionally only use 50% of the CPU power available? Is this some kind of Windows limit?

I am playing Factorio 0.10.12 Windows x64.

performance1.png
performance1.png (40.53 KiB) Viewed 13154 times
CPU graph - All four are being used, but the total is never more than 50%.
performance2.png
performance2.png (33.87 KiB) Viewed 13154 times
performance3.jpg
performance3.jpg (419.97 KiB) Viewed 13153 times
------------------
System Information
------------------
Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.140303-2144)
Language: English (Regional Setting: English)
System Manufacturer: Dell Inc.
System Model: Inspiron 580
BIOS: Default System BIOS
Processor: Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz (4 CPUs), ~2.7GHz
Memory: 8192MB RAM
Available OS Memory: 8152MB RAM
Page File: 7458MB used, 8841MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7601.17514 32bit Unicode

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: Factorio only uses 50% CPU

Post by Boogieman14 »

In the Factorio settings ("Other" category), how's your "Max Threads" setting set? Looks like it defaults to 2, so that would effectively limit the number of cpu cores to two (where the Windows scheduler does something funky so it still gets distributed over all cores anyway)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Factorio only uses 50% CPU

Post by DaveMcW »

Max threads is 4.

I tried increasing it to 8 (max), but nothing changed.

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Factorio only uses 50% CPU

Post by keyboardhack »

I have the same problem. Factorio only uses 20% cpu but the fps occasionally drops to 30 for 10+ seconds.
I too have a very large map and a computer that should be able to handle Factorio with no problem.
Waste of bytes : P

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: Factorio only uses 50% CPU

Post by SilverWarior »

What is the GPU usage? I recomend using Process Explorer from http://technet.microsoft.com/en-us/sysi ... 96653.aspx for this.
If your GPU is fully utilized then your graphics card is the reason for game slowdowns and why the CPU isn't fully utilized as it is waiting for the GPU to finish rendeiring scene.
Based on developers calims upcoming version should eliminate this by adding ability to skip frames.

Another good thing about Process explorer is that it will also alow you to see exactly how many threads are used by Factorio. Setting max threads setting to certain number isn't a guarantee that factorio will use that many threads but only that it will try to initialize so many threads. Wheter it sucseeds is all up to the OS.

NOTE: Thread list in Process Explorer could show larger number of threads than they are used by Factorio. This happens becouse some processing is done by external window components and so their threads are also listed. Only threads that show Factorio.exe as their binary source are actual Factorio threads.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Factorio only uses 50% CPU

Post by DaveMcW »

gpu.png
gpu.png (29.63 KiB) Viewed 13068 times

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: Factorio only uses 50% CPU

Post by SilverWarior »

Can you now doubleclick on Factorio.exe entry and switch to Threads tab so we can see how many threads does the factiorio actually use?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Factorio only uses 50% CPU

Post by DaveMcW »

This is with Max Threads = 4.
threads.png
threads.png (47.68 KiB) Viewed 13062 times

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: Factorio only uses 50% CPU

Post by SilverWarior »

Hmm that is strange. There shouldn't be so many threads created based on your current MaxHtreads setting. I'll have to do some testing to see if Factio there might be a bug which causes Factorio to ignore this setting.

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Factorio only uses 50% CPU

Post by cube »

It's not a bug, only a inaccuracy in the settings label. The max threadds settings only changes maximum number of some threads... Audio, map generation and lots of other things have their threads regardless of this settings :-)

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: Factorio only uses 50% CPU

Post by SilverWarior »

cube wrote:It's not a bug, only a inaccuracy in the settings label. The max threadds settings only changes maximum number of some threads... Audio, map generation and lots of other things have their threads regardless of this settings :-)
Since when is that? I haven't noticed this before. I remember that when multithreading support was initially added factorio created so many threads as it was set in MaxThreads setting.

Post Reply

Return to “Technical Help”