what is the limitation on max cuda instances for video transcoding?

Hello,

I have set up Nvidia V100 card on Azure Nc6s_v3 virtual machine. I have set up the latest CUDA driver and SDK. I compiled sample programs from “Video_Codec_SDK_9.0.20” and verified the max parallel transcode sessions using AppTrans binary. What I found is I can run 25 parallel transcode instances (25 decode, 25 encode), 26th instance will wait for anyone session to be deinitialized.

Can somebody explain, why is this limitation?

according to https://developer.nvidia.com/video-encode-decode-gpu-support-matrix article there is no limitation on max concurrent sessions.

I compiled Gstreamer framework by enabling Nvidia plugins (nvdec and nvh264enc). I am seeing similar behavior here also. For 26th concurrent transcode session I am getting the following error:

ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNvH264Enc:nvh264enc0: Could not initialize supporting library.
Additional debug info:
gstnvbaseenc.c(423): gst_nv_base_enc_open (): /GstPipeline:pipeline0/GstNvH264Enc:nvh264enc0:
Failed to create CUDA context, perhaps CUDA is not supported.
Setting pipeline to NULL ...
Freeing pipeline ...

Thanks in advance.

That means that the number of sessions is unrestricted by the GPU architecture itself. It does not mean you can run an infinite number of sessions. There may be any number of other limitations on the number of sessions you can run.

Hello Robert, thank you for the details. With the above-mentioned transcoding details there is still room to run new transcoding session. But I am unable to spawn new process due to the CUDA initialization error.