SaschaWillems / Vulkan

C++ examples for the Vulkan graphics API
MIT License
10.18k stars 2.02k forks source link

Why in RTX mode not utilized all GPU power? #1111

Closed tigrazone closed 6 months ago

tigrazone commented 6 months ago

I have nvidia 3060 laptop and with default scene I have 85%-95% of GPU usage. Why speed is variable? When I try run on nvidia 4090, I have 25% -35% of GPU usage. How to use 95% - 100% of GPU in RTX mode on ANY GPU?

First screenshot - raytracinggltf image as we see, clocks of GPU Core uses only 1492Mhz, not maximal 2010Mhz, Load 76%-84%, not always 100%

Second screenshot - rayquery image Load 73%-80% and clocks is same

Code compiled with Visual Studio 2019 in Release mode with recommended here https://developer.nvidia.com/blog/vulkan-dos-donts/ SET _NO_DEBUG_HEAP=1

How to get maximal performance with 95%-100% of GPU load all the time?

tigrazone commented 6 months ago

One more example image code taken from your repo https://github.com/SaschaWillems/VulkanPathTracer and this is sceneIndex = 1 and scene from "models/CornellBox-Original.gltf" here Load is 97%-100% all the time but GPU core clock 1200-1210MHz, not maximal 1950MHz. Compiled with VS 2019 in Realease with same seted environment variable

SaschaWillems commented 6 months ago

Those are just samples. None of these is especially complex nor meant to show how to fully utilize a GPU.

tigrazone commented 6 months ago

Ok. What to do for fully utilize a GPU?

SaschaWillems commented 6 months ago

Fully utilizing a GPU is very hard and not always possible. That's totally out of scope for discussion in the issues of my samples.

tigrazone commented 6 months ago

thank you. if you have some articles to read about it, send me