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

GPU VE usage 102% but Windows task manager shows only 53% #468

Closed
BigFatBass opened this issue Mar 1, 2023 · 6 comments
Closed

GPU VE usage 102% but Windows task manager shows only 53% #468

BigFatBass opened this issue Mar 1, 2023 · 6 comments

Comments

@BigFatBass
Copy link

Hi, rigaya

For a long time (I don't remember exactly from which release) I'm observing very high GPU VE usage 101...102% in the program's status bar and its log in Windows.
However, Windows task manager shows only 53% of Video Encoder utilization.

One video file is processed at a time.

It doesn't affect anything and an output file is transcoded as expected. But these figures confuses an user.

Please note that GPU DE utilization matches the corresponding task manager info.

My test environment is below:

OS: Windows 11
Video card: NVIDIA GTX 970
NPP release: CUDA 12.1.0
NVIDIA Driver release: 531.18
NVEncC release: 7.19 x64
Video process: Transcoding & Resizing/Downscaling one file at a time
Input file: MP4 H.264 FullHD (1920x1080)
Output file: MP4 H.265 HD (1280x720)

Test demo video sample (as input file) location: https://all-free-download.com/free-footage/download/rotating_orange_6891693.html

Command line example: NVEncC64.exe" -i "C:\rotating_orange_6891693\Rotating_orange.mp4" -o "C:\rotating_orange_6891693\out.mp4" --avhw --output-res 1280x720 -c hevc --profile main --level 4.1 --tier high --vbr 3000 --vbr-quality 19 --max-bitrate 5000 -u quality --multipass 2pass-full --lookahead 32 -b 3 --ref 9 --weightp --mv-precision Q-pel --aq --aq-temporal --bref-mode each --sub-copy --chapter-copy --attachment-copy --metadata copy --video-metadata copy --audio-metadata copy --vpp-deband rand_each_frame --vpp-edgelevel --vpp-resize super --output-thread 1 --log-level info --output-depth 8 --vbv-bufsize 12000 --gop-len 60 --audio-copy --log C:\rotating_orange_6891693\nvencc.log

Two log files (of info and debug levels) are zipped and attached.
nvencc_logs.zip

@ysnist
Copy link

ysnist commented Mar 1, 2023

Actually, there is nothing wrong with this because NVENC, like other encoders, measures the consumption of your Video Engine chip. This can be misleading as Windows shows you a percentage of the entire capacity of your graphics card because only the video card's video encoding engine is used when encoding video. You can easily find this out with nvidia-smi or gpu-z.

You can also get the same result if several of your hardware bottlenecks your graphics card during video encoding

@rigaya
Copy link
Owner

rigaya commented Mar 1, 2023

One more case is that there is some GPUs with multiple "Video Encode" entries (shown below).

In the case, the utilization shown on the log will be sum of the entries. Therefore you might see higher utilization on the log compared to checking single entry on the task manager.

image

@BigFatBass
Copy link
Author

Hi, rigaya, ysnist

I've made some experiments in Windows 11 and Linux. Please find the results with my comments below.

Here are my SW environment in Linux:
OS: Ubuntu-22.04.2 x64
Kernel: 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC x86_64
NVIDIA Driver: 525.85.05
NVEnCC release: 7.19 installed from nvencc_7.19_Ubuntu22.04_amd64.deb

Monitoring Test SW:

  1. nvidia-smi. Two command lines are used: 'nvidia-smi -q -d UTILIZATION' and 'nvidia-smi dmon -s u'
  2. (Only in Linux) nvtop v.3.0.1 (https://github.com/Syllo/nvtop)
  3. (Only in Windows) gpu-z 2.52.0

Please note that:

  1. Windows and Linux are installed on the same HW.
  2. The input video is the same under Windows and Linux.
  3. The NVEnCC command line is the same under Windows and Linux.

Here are my results:

  1. In Windows, NVEnCC shows 100+ % of GPU VE utilization on both H.264 and H.265 codecs.
    The value doesn't change even if the NVEnCC is run with minimum config such as 'NVEncC64.exe -i "in_fhd.mp4" -o "out_hd.mp4" --avhw --output-res 1280x720'
    Also I rolled back the program upto v5.00 but without a result
  2. In Linux, NVEnCC shows about 50% of GPU VE utilization
  3. nvidia-smi displays about 50% of Video Encoder utilization in both the OSs.
    The same result is in nvtop in Linux
  4. Windows Task Manager has two "Video Encode" entries similar to your screenshot. Each entry shows about 50%.
  5. gpu-z has 'Video Engine Load' field which displays 99% during NVEnCC is running. I don't know that it means but there are no any fields dedicated to Video Encoder and Video Decoder.

The screenshots are attached.
windows_11

ubuntu-22 04 2

@ysnist
Copy link

ysnist commented Mar 3, 2023

Can you share the command line you used during coding and a sample video file. I have many video cards and processors and I can try the same tests myself. I suspect the filters you are using or your hardware is the bottleneck. I have been encoding with NVEC for a very long time and I have converted thousands of videos with about 12 different video cards and I have never encountered such a problem before.

@rigaya
Copy link
Owner

rigaya commented Mar 4, 2023

NVEnc 7.20 has changed utilization calculation when multiple encoder engine exists in GPU, which will show ulitization near to task manager.

@BigFatBass BigFatBass reopened this Mar 6, 2023
@BigFatBass
Copy link
Author

Hi, rigaya

I've checked in v.7.20 the GPU VE utilization figures are the same as in Windows Task Manager, and in nvidia-smi statistics in both Windows 11 and Ubuntu 22.04.

Thank you, I appreciate it.

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

3 participants