A problem I've been having with using NVENC is the occasional message that says "Encoder Overloaded!" and a log that would show something like
No matter what settings I try CQP [25-50], VBR [10K-50K], different presets from High Performance all the way down to Low Latency High Performance, I would keep hitting the encoder overloaded message as well as finding encoding lag messages in the log.
I figure this shouldn't be happening, I have a GTX 1070 and it is not an underperforming card by any means. I looked into monitoring the card under this workload and saw that a single stream only consumes about 5% - 7% of NVENC's utilization. This can be checked with command `nvidia-smi dmon` under the enc column. sm column represents CUDA workload
This confirms that the encoder itself shouldn't be overloaded at all, but what if it was just slow for some reason? I poked around in nvidia-settings and found the PowerMizer settings and saw that I was on Adaptive mode. I changed this to Prefer Maximum Performance and ran a 1080p60 HITMAN recording at CQP: 25, Preset: High Performance, Profile: High.
I was able to play for 30 minutes and not have the "Encoder overloaded!" message show up. I'm guessing what happens is during cutscenes, light rendering parts, or menu access, the pclk gets downclocked and causes encoding lag for OBS.
I know others have seen this problem as well and hopefully others can try this and see if it fixes their problems. I'll be playing around some more and seeing if I can further confirm my findings.
Code:
05:46:36 PM.150: Output 'adv_file_output': Number of skipped frames due to encoding lag: 219 (2.8%)
05:46:36 PM.150: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 16 (0.2%)
No matter what settings I try CQP [25-50], VBR [10K-50K], different presets from High Performance all the way down to Low Latency High Performance, I would keep hitting the encoder overloaded message as well as finding encoding lag messages in the log.
I figure this shouldn't be happening, I have a GTX 1070 and it is not an underperforming card by any means. I looked into monitoring the card under this workload and saw that a single stream only consumes about 5% - 7% of NVENC's utilization. This can be checked with command `nvidia-smi dmon` under the enc column. sm column represents CUDA workload
Code:
$ nvidia-smi dmon
# gpu pwr temp sm mem enc dec mclk pclk
# Idx W C % % % % MHz MHz
0 114 62 90 35 6 0 4006 1885
0 85 62 83 29 5 0 4006 1885
0 90 62 91 33 6 0 4006 1885
0 106 62 90 33 7 0 4006 1885
0 116 62 91 34 8 0 4006 1885
This confirms that the encoder itself shouldn't be overloaded at all, but what if it was just slow for some reason? I poked around in nvidia-settings and found the PowerMizer settings and saw that I was on Adaptive mode. I changed this to Prefer Maximum Performance and ran a 1080p60 HITMAN recording at CQP: 25, Preset: High Performance, Profile: High.
I was able to play for 30 minutes and not have the "Encoder overloaded!" message show up. I'm guessing what happens is during cutscenes, light rendering parts, or menu access, the pclk gets downclocked and causes encoding lag for OBS.
I know others have seen this problem as well and hopefully others can try this and see if it fixes their problems. I'll be playing around some more and seeing if I can further confirm my findings.