Where is the bottleneck?

So I've been looking at some game's CPU/CPU usage a lot now that I upgraded my graphics card and I've noticed that in some cases my GPU is sitting at 50% and so is my CPU, not only 50% overall usage but around 40-70% usage in any individual core. So it would seem to me that if this is the case I should be getting a higher framerate because no single CPU core or my GPU is being maxed out.

This only happens in some games, others are able to max out either GPU, CPU or both. Could someone with a deeper knowledge on hardware explain to me why this may be the case?

Here's an example where my CPU and GPU aren't being used to thier full potential.


And here's an example of where I can get both very high GPU and CPU usage.


My specs

AMD FX 8350
Gigabyte GA-990XA-UD3 Rev 4
GTX 1060
8GB DDR3 @1600 9-9-9-24
 
Just non-optimal code, probably. If they're waiting on each other, there can be idle moments. Worst case, let's imagine a game requires the CPU to do all it's processing before it can create jobs for the GPU, and then the CPU does nothing while the GPU works. You could have the CPU work for 20ms, then the GPU work for 20 ms, with a total frame time of 40 ms. Now if it could be written so the two run concurrently, you're down to 20 ms frame time and far more utilisation. Some jobs are serial though and you just have spaces.

Here's a GPU utilisation graph from a console game, The Tomorrow Children on PS4.
http://cdn3.dualshockers.com/wp-content/uploads/2014/09/TomorrowChildren33.jpg

You can see that there's plenty of idle GPU time, which they were able to partially fill by using async compute. Modern DX12 games should get similar improved utilisation on PC. It's still well below 100% though.

Or basically, your utilisation is just the way it is. ;) More than that is only obtained in processor thrashing benchmarks.
 
Thanks for the replies.

Just non-optimal code, probably. If they're waiting on each other, there can be idle moments. Worst case, let's imagine a game requires the CPU to do all it's processing before it can create jobs for the GPU, and then the CPU does nothing while the GPU works. You could have the CPU work for 20ms, then the GPU work for 20 ms, with a total frame time of 40 ms. Now if it could be written so the two run concurrently, you're down to 20 ms frame time and far more utilisation. Some jobs are serial though and you just have spaces.

Here's a GPU utilisation graph from a console game, The Tomorrow Children on PS4.
http://cdn3.dualshockers.com/wp-content/uploads/2014/09/TomorrowChildren33.jpg

You can see that there's plenty of idle GPU time, which they were able to partially fill by using async compute. Modern DX12 games should get similar improved utilisation on PC. It's still well below 100% though.

Or basically, your utilisation is just the way it is. ;) More than that is only obtained in processor thrashing benchmarks.

That's interesting but what I don't quite understand is why isn't let's say the CPU or at least one thread in the CPU working at full speed if the GPU is waiting for it?

Vsynch turned on, triple buffer turned off...? :p

Yes ^^
 
That's interesting but what I don't quite understand is why isn't let's say the CPU or at least one thread in the CPU working at full speed if the GPU is waiting for it?
If the CPU has to wait for data, or if the GPU has to wait for the GPU, or the CPU has to wait for the GPU. That 50% utilisation is an average over a sample time. Let's say one frame. Within that one second, the CPU could be working 100% for 0.5 of the frame, and then sitting idle. Or it could be working 100% of the time for 0.25 of the frame, then idle 0.25f, then working 100% for another 0.25f. Or it could be working 80% for 0.5 of the frame and then 20% for the other 0.5.

If you have VSync on, the processors will sit twiddling their thumbs until the frame is finished drawing. So if you draw the frame in only half the time required for 60 fps, you'll be idle 50% of the time as there's literally nothing to do until the next frame (unless you have triple buffering on where it can start work on another frame). Disable VSync and see how that affects utilisation.
 
:D

This is a bad combo of settings. If you want to play with vsynch on, you should either use your driver's "smart vsynch" setting - if applicable; I think only Nvidia offers it as standard - or you should enable triple buffering.

Otherwise you're running double buffered video, and this means that one buffer will be the one currently showing on-screen. The other buffer is the one your GPU is drawing onto. If drawing is slower - even if only very slightly - than full framerate, the GPU will have to wait an entire frame's time doing nothing before it can flip buffers and start drawing again.

Triple buffering gives your GPU an additional framebuffer to use as "overflow". (Unfortunately, stupid programmers often use these triple buffers in straight sequence, adding a frame of additional latency (16ms for 60fps) to your inputs. Slight drawback for action games; killer drawback for anything made with Source engine, sadly, which becomes hugely laggy with triplebuffering enabled.)
 
@Gral I misread your post sorry about that, v-sync was off but it lead to an interesting explaination about the triple buffer so great :D

@Shifty That makes it a lot clearer for me thanks for the answers, I wonder if there's a way to have a look at those utilization spikes in a log or something.
 
Back
Top