Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add Video Decoder and Encoder load to the GPU Panel #63

Closed
ghost opened this issue Oct 21, 2023 · 4 comments
Closed

[Feature] Add Video Decoder and Encoder load to the GPU Panel #63

ghost opened this issue Oct 21, 2023 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 21, 2023

I recently found this app and like its design and usability a lot!

One thing that it misses compared to the similar app Mission Center is the ability to show the load of not just the GPU itself, but also of the video de- and encoding units of it. This is useful to troubleshoot if the video de- and encoding of the GPU gets actually used or if something is not working properly.

It could either be added as its own category or right below the memory usage graph. But this is just an suggestion, it being there would be the most important thing.

@nokyan
Copy link
Owner

nokyan commented Oct 22, 2023

Hi, thanks for the suggestion.
I'll put it on my to-do list. :)

@nokyan
Copy link
Owner

nokyan commented Oct 27, 2023

image
I've implemented it for NVIDIA GPUs, for AMD it's probably gonna be a bit more difficult though :)

@do-sch
Copy link

do-sch commented Dec 28, 2023

To make this work with AMD and Intel GPUs, you will have to read the computing time of each individual process from fdinfo in proc and add up the utilization of all processes.
Example of that file:

pos:	0
flags:	02100002
mnt_id:	34
ino:	659
drm-driver:	amdgpu
drm-client-id:	428
drm-pdev:	0000:63:00.0
pasid:	32789
drm-driver:	amdgpu
drm-pdev:	0000:63:00.0
drm-client-id:	641912
drm-memory-vram:	186708 KiB
drm-memory-gtt: 	17828 KiB
drm-memory-cpu: 	0 KiB
amd-memory-visible-vram:	186708 KiB
amd-evicted-vram:	0 KiB
amd-evicted-visible-vram:	0 KiB
amd-requested-vram:	186708 KiB
amd-requested-visible-vram:	39748 KiB
amd-requested-gtt:	17828 KiB
drm-engine-gfx:	22584849422 ns
drm-engine-enc:	88926670130 ns

You can then parse the following information from it:

Time that the process has rendered:
AMD: drm-engine-gfx
Intel: drm-engine-render

Time that the process has encoded or decoded:
AMD: drm-engine-enc
Intel: drm-engine-video

AMD also has the following keys, which never appear on my hardware (Radeon 780M):

drm-engine-compute
drm-engine-dma
drm-engine-dec
drm-engine-enc_1
drm-engine-jpeg
drm-engine-vpe

Intel still has some, but I will never fill them on my Intel HD 515:

drm-engine-compute
drm-engine-copy
drm-engine-video-enhance

With AMD, you could also read out how much VRAM each process is using.

The whole thing will probably be even more complicated, however, because there are systems that have several GPUs. You then have to differentiate based on the drm-pdev value.

I started something like this some time ago for a demo application, but never went any further.

@nokyan
Copy link
Owner

nokyan commented Dec 28, 2023

To make this work with AMD and Intel GPUs, you will have to read the computing time of each individual process from fdinfo in proc and add up the utilization of all processes. Example of that file:

pos:	0
flags:	02100002
mnt_id:	34
ino:	659
drm-driver:	amdgpu
drm-client-id:	428
drm-pdev:	0000:63:00.0
pasid:	32789
drm-driver:	amdgpu
drm-pdev:	0000:63:00.0
drm-client-id:	641912
drm-memory-vram:	186708 KiB
drm-memory-gtt: 	17828 KiB
drm-memory-cpu: 	0 KiB
amd-memory-visible-vram:	186708 KiB
amd-evicted-vram:	0 KiB
amd-evicted-visible-vram:	0 KiB
amd-requested-vram:	186708 KiB
amd-requested-visible-vram:	39748 KiB
amd-requested-gtt:	17828 KiB
drm-engine-gfx:	22584849422 ns
drm-engine-enc:	88926670130 ns

You can then parse the following information from it:

Time that the process has rendered: AMD: drm-engine-gfx Intel: drm-engine-render

Time that the process has encoded or decoded: AMD: drm-engine-enc Intel: drm-engine-video

AMD also has the following keys, which never appear on my hardware (Radeon 780M):

drm-engine-compute
drm-engine-dma
drm-engine-dec
drm-engine-enc_1
drm-engine-jpeg
drm-engine-vpe

Intel still has some, but I will never fill them on my Intel HD 515:

drm-engine-compute
drm-engine-copy
drm-engine-video-enhance

With AMD, you could also read out how much VRAM each process is using.

The whole thing will probably be even more complicated, however, because there are systems that have several GPUs. You then have to differentiate based on the drm-pdev value.

I started something like this some time ago for a demo application, but never went any further.

Thank you very much for the info, I unfortunately forgot to close this issue, GPU encoding/decoding is already in Resources 1.3 (Flathub will hopefully soon get the update aswell). 😅
I adapted much of nvtop's code for that.

@nokyan nokyan closed this as completed Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants