0
\$\begingroup\$

I've been developing a C++ OpenGL game for the last couple of months.

A few weeks ago I was profiling the game and I noticed that the GPU usage was almost at 100% (with the framerate uncapped). I added a new feature and the GPU usage capped at arround 35% (also with the framerate unlocked).

At first I thought that this was about CPU bottleneck, but the CPU was also around 35% usage.

I was expecting the framerate to lower after that update (and it did, from about 2000 to 600) but I thought that the CPU / GPU usage would still be high.

Having the GPU usage this low makes me think that I should be getting more FPS.

Is this behaviour normal, or did I do something wrong?

\$\endgroup\$
4
  • 5
    \$\begingroup\$ When you check the CPU usage, make sure you check all cores separately. Maybe one of your cores is at 100% while the others are idle. \$\endgroup\$
    – Vaillancourt
    Sep 9 '21 at 0:02
  • 1
    \$\begingroup\$ There are also other possible resource bottlenecks, like memory access, pcie lanes or file IO which can cause both gpu and cpu to stall. Did you rule those out? \$\endgroup\$
    – Philipp
    Sep 9 '21 at 8:09
  • \$\begingroup\$ @Vaillancourt , that was it. One of the CPU cores is performing at 95% while the others are lower. Thank you! \$\endgroup\$ Sep 9 '21 at 13:26
  • \$\begingroup\$ Glad I could help! You're free to write an answer to your own question if you want :) \$\endgroup\$
    – Vaillancourt
    Sep 9 '21 at 13:38
0
\$\begingroup\$

As @Vaillancourt pointed out, even though the CPU wasn't getting high usage percentage, one of it's cores was. I guess it's time to improve the multi-threading of my game!

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .