[FFmpeg-trac] #7582(undetermined:new): hwaccel cuvid/nvenc performance degredation when using aq (temporal-aq or spatial-aq) with multiple concurrent encodes

FFmpeg trac at avcodec.org
Sat Mar 30 13:41:55 EET 2019


#7582: hwaccel cuvid/nvenc performance degredation when using aq (temporal-aq or
spatial-aq) with multiple concurrent encodes
-------------------------------------+-------------------------------------
             Reporter:  malakudi     |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:  regresssion  |               Blocked By:
  cuda nvenc                         |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by malakudi):

 The problem still exists with current git, I have changed the testing
 process a bit.
 Running script
 {{{
 #!/bin/bash
 for i in `seq 1 $1` ;
 do
 ffmpeg-git -nostdin -loglevel error -stats \
 -hwaccel cuvid -c:v h264_cuvid -surfaces 12 \
 -i bbb_sunflower_1080p_30fps_normal.mp4 \
 -vf scale_npp=w=1280:h=720 \
 -c:v h264_nvenc \
 -preset medium \
 -refs 4 -bf 3 \
 -temporal-aq 1 \
 -acodec copy -f mpegts -y /dev/null &
 done
 wait
 echo done
 }}}

 You can run several instances and check the average fps achieved. With
 current git code and temporal-aq enabled, one instance gets 653 fps on my
 RTX 2080, two instances get 175 each, dropping to a total of 350 fps.

 I have attached diff to disable cuda sync on current git. With sync
 disabled, performance is OK, there is no degredation. One instance runs at
 669 fps (a bit higher compared with original git code), two instances
 however get 334 fps each for a total of 668 fps.

 So we see an almost 50% performance degredation when using cuda sync and
 temporal-aq is used. If temporal-aq is not used, there is no performance
 degredation.

 Please, some developer confirm the issue and either revent the usage of
 cuda sync or escalate the issue to nvidia.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7582#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list