GPU Usage?

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
Maddhawk
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat May 05, 2018 6:53 am
Contact:

GPU Usage?

Post by Maddhawk »

I am curious to know how much Factorio utilizes the GPU during gameplay?

Koub
Global Moderator
Global Moderator
Posts: 7215
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: GPU Usage?

Post by Koub »

Very little actually. what Factorio needs most is :
1) Single core CPU
2) VRAM
Koub - Please consider English is not my native language.

Maddhawk
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat May 05, 2018 6:53 am
Contact:

Re: GPU Usage?

Post by Maddhawk »

Not sure why you moved this thread. I made it to collect information on how the game is processed so I can brainstorm ideas to give to the devs to help them better optimize belt performance so the question of system performance can be ignored in the bots vs belts debate.

Since you say the GPU is being vastly underutilized, then I wonder if it can't be arranged to use the GPU's spare overhead processing power to handle many of the calculations the game has to perform to update the status of each square on the grid in game. Also why only single thread? I don't think single core CPUs even exist anymore unless a rig is like 20+ years old. That means I essentially have 11 threads unused and a GPU that is more or less just idling.

Koub
Global Moderator
Global Moderator
Posts: 7215
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: GPU Usage?

Post by Koub »

Hi,

I didn't move the thread, just answered. I don't want to sound rude or condescending, but I think the devs have spend a LOT of time brainstorming and optimizing the game engine, and they are terribly good at doing so. I'm not saying you can't be of any help regarding optimization, just it's extremely unlikely.

Now back to your questions :
1) regarding single/multi threading :
The game is not exactly mono-threaded. However, the part of the game that is the more demanding in terms of computation is single threaded. All CPUs you can expact Factorio to run on have enough multithreading capacity for it not to be a choke point. But for the non multi-threadable part, the better single-threaded capacity your CPU has, the better for UPS.

2) regarding the handling of some of the calculations to the GPU, the 1) tells why this won't work : GPUs are excellent in massively parallel computing. They are not designed for single-threaded computing.

If you want to know more about how Factorio works, and why your idea won't work, the devs have written some things :
https://www.factorio.com/blog/post/fff-151
Also this topic : viewtopic.php?f=5&t=39893 (read all of it, you'll see this has been discussed a LOT)
and more specifically these posts :
viewtopic.php?p=238247#p238247
viewtopic.php?p=241714#p241714
viewtopic.php?p=306350#p306350
(but you should really read the whole topic)

Also I realize that I wrote something inaccurate : it's not really the single threaded computation capacity the choke point, but the data it needs to be fed. The CPU is usually data starved, so it's more of a memory bandwidth problem.
Koub - Please consider English is not my native language.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: GPU Usage?

Post by Jap2.0 »

Maddhawk wrote:Not sure why you moved this thread. I made it to collect information on how the game is processed so I can brainstorm ideas to give to the devs to help them better optimize belt performance so the question of system performance can be ignored in the bots vs belts debate.

Since you say the GPU is being vastly underutilized, then I wonder if it can't be arranged to use the GPU's spare overhead processing power to handle many of the calculations the game has to perform to update the status of each square on the grid in game. Also why only single thread? I don't think single core CPUs even exist anymore unless a rig is like 20+ years old. That means I essentially have 11 threads unused and a GPU that is more or less just idling.
The game is already ridiculously well optimized - see FFF 176. GPUs are not well suited to things that are largely single-threaded - I'm not an expert on the topic, but I have looked into GPUs some, and one type of problem they are especially good at is literally called "embarrassingly parallel". Many entities in Factorio are dependant on other entities around them (i.e. belts and inserters and assembly machines, steam engines and pipes and heat exchangers and boilers and inserters and belts and inserters and chests and inserters and trains and signals and inserters and belts and miners.) Also note that your GPU isn't entirely unutilized - it still has a game to run, and what about things such as integrated graphics or very old graphics cards? Do you let the GPU be a bottleneck on UPS? Do you add a system to dynamically allocate tasks between the GPU and CPU? Even if you do make use of the graphics card, you'll still probably be bottlenecked by memory bandwidth and/or latency. Also note that adding this would be complex, making future changes more difficult and likely adding bugs.
There are 10 types of people: those who get this joke and those who don't.

Post Reply

Return to “Technical Help”