protonscr

If cpu power profile is performance gpu usage is 100 % even not using all cpu cores ?

dxvkclosed question
doitsujin/dxvk#2678 · opened 2022-06-11 by Augusto7743 · updated 2022-06-14 · 11 comments · github
AAugusto7743 2022-06-11 github

Ubuntu 20.04.4 Nvidia 470 GT 640 WINE 7.7 DXVK 1.10.1.

If using cpu power profile "power save" the cpu is clocked to 1.4 GHz in each core.
WINE running Visual Pinball X has 100 % speed without errors and all graphics being showed without problems.
CPU usage in used core is below of 40 %.
GPU usage is 45 %.

If cpu power profile is "performance" the cpu is clocked to 3,5 GHz in each core.
WINE running Visual Pinball X continue being the same 100 % speed without errors and all graphics being showed without problems in same FPS speed.
CPU usage continue being below of 40 %, but
GPU usage is reported in Nvidia X Server Settings using 100 % even doing the same task.
Strange detail is temperature is low (less of 45 c) if usage is 100 %. 100 % usage is above 60 c. Wrong temperature value ?
Nvidia X Server Settings report correctly to any other software thus I not understand if is an bug in Nvidia software.

Using cpu power profile "performance" does DXVK or other component to use GPU at limit ?
You can test in your machine if happen the same issue with Geforce video card ?

Thanks for read my topic.

KK0bin maintainer 2022-06-11 github

I don't quite understand the problem.

Changing the CPU governor only impacts the CPU. So assuming it can still provide the GPU with new work quickly enough, the GPU will still run at 100%.

AAugusto7743 2022-06-12 github

Thanks for your reply.
I said that cpu governor in power saver the gpu usage is below of 45 % and in cpu performance the cpu usage goes to 100 %.
The strange detail is in power saver the software run 100 % speed being totally rendered all graphics without problems and when in cpu governor performance the gpu usage is 100 %.
Another detail GPU performance level is 1 (max clock) in both cpu governor modes.

Perhaps is happening something wasting gpu usage when changing to cpu governor performance ?
That strange detail only happen when using WINE running Virtual Pinball with DXVK.

YYellowOnion 2022-06-12 github

@Augusto7743 No offense but all the things you describe are exactly what I would expect to happen, and I'm pretty sure you just don't understand how CPU and GPU code interact in games.

If you set CPU governor powersave, your CPU is slow, and your CPU cannot feed the GPU fast enough, thus your GPU is not working very hard.

If you set the CPU governor to performance then the CPU can feed the GPU fully, and the GPU cannot keep up with the CPU and thus your CPU is not fully used, you're also assuming that the game is most unlikely perfectly optimized to use all CPU cores.

based on your 40% CPU load. I would guess you have a 4 core system, and this pinball game only uses 1 core at 100%, and is bottlenecked on that single core performance when you have 1.4GHz clock, when you up your clock by >2x your GPU load also goes up by >2x, which is in the realm of shifting the bottleneck from CPU to GPU.

Even in single core system there's no promise of 100% CPU utilization if the game is coded that it sleeps waiting for the GPU to finish it's work.

Use the builtin framerate limiter, to cap your game to a more power friendly setting like 30 or 60fps.

AAugusto7743 2022-06-12 github

Thanks very much for your reply.
All right with you ?

Oh yes I understand that cpu power saver does bottleneck to GPU, but not is exactly the inside of my topic.

That problem only happen with Virtual Pinball (use D3D9).
In cpu power saver even gpu being used less of 50 % Virtual Pinball is running correctly in 100 % speed.
Virtual Pinball not use extreme graphic quality and also I had configured all setting to low quality.
Virtual Pinball even in loaded table without any gameplay and static graphics is reported gpu usage 100 %
Thus I not understand if is an bug in Nvidia driver reporting wrong gpu usage because in others softwares gpu usage 100 % temperature goes above 60c and about that topic cpu power performance gpu usage being 100 % temperature is below of 50c.
Have anything wrong.

Thus I want report to DXVK creator about it.
I have tested loading Ultimate Doom in OpenGL and Vulkan modes both reporting gpu usage below of 50 % in cpu performance mode.
DXVK wasting gpu usage in Virtual Pinball D3D9 or Nvidia X Server bug ?

"Frame rate limit" is to be configured in Linux environment or in WINE ?

YYellowOnion 2022-06-12 github

It's an environment variable just run the game like DXVK_FRAME_RATE=60 wine <game>

You're comparing a 20 year old game that's been modernized slightly to a 25 year old game that's also been modernized heavily, and expecting similar results?

KK0bin maintainer 2022-06-12 github

Either way there's nothing we can do here.

AAugusto7743 2022-06-13 github

@YellowOnion

Thanks very much !
The solution was
DXVK_FRAME_RATE=60 wine VPinballX.exe

Now using cpu governor performance the gpu usage is 25 %.
Not more wasting gpu usage.

Visual Pinball render graphics (ball, lights effects and other objects) above table background.
Not is possible in DXVK next version any internall default setting to avoid that type of problem ?

The file has 2 logs both cpu governor performance.
VPinballX_d3d9-1 = gpu usage 100 %
VPinballX_d3d9-2 = gpu usage 25 % (frame rate limiter)
VPinballX_d3d9log.zip

BBlisto91 2022-06-13 github

@Augusto7743 Glad you got something you are happy with.
Am i understanding you correctly that there are graphical artifacts in the game if you don't limit the fps? Or what do you mean.

AAugusto7743 2022-06-14 github

@Blisto91
Hello. all right with you ?
Visual Pinball exactly with same speed and not graphics glitches enabled or disable frame limiter.
Is how if not using frame limiter DXVK or other component are waasting gpu usage with unnecessary tasks.

BBlisto91 2022-06-14 github

I'm alright hehe, hope you are too.

Okay understood 👍

AAugusto7743 2022-06-14 github

Thanks very much and an nice week for all DXVK developers.

Launch options