Stream Performance Drops When Number of Streams Less than Batch Size

Please provide complete information as applicable to your setup.

**• GPU (RTX 3060 Ti)
**• DeepStream Version: 6.2
**• TensorRT Version:
• NVIDIA GPU Driver Version (valid for GPU only) 525.105.17
• Issue Type( questions, new requirements, bugs) Question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

  1. Start the deepstream-app reference application, configured with a streammux batch-size of, say, 4, and further configure the application to use anywhere between 1-3 (inclusive) RTSP streams, preferably streams with known frame rates (I’m running 30fps 1080p streams).
  2. Watch the performance metrics. They all show ~25fps (at least in my case).
  3. Restart the deepstream-app reference application but this time with a streammux batch-size matching the number of RTSP streams.
  4. Watch the performance metrics. They all show 30fps.

This is a bit confusing to me as the docs for nvds-streammux say “batch-size” should be the maximum size of the batches to be processed, and so one would presume that a pipeline with fewer sources than “batch-size” would perform just fine.

In fact, I’ve noticed that no matter the batch size, if I use any number of streams smaller than the batch size, I always see a 5fps drop in each stream.

I also put some debug code into deepstream_perf.c. Nothing looks out of the ordinary, but the corresponding “buffer_cnt” property in NvDsInstancePerfStruct has a value of 25 less in the case where the number of streams is smaller than the batch size.

E.g. buffer_cnt == 125 when the performance timer callback fires every 5s when the number of streams is fewer than the batch size, and buffer_cnt == 150 otherwise.

Possibly related, based on, I would think that updating batch-size in the appropriate plugins would be necessary; however, I’ve tried doing something similar by making adjustments to the deepstream-app application, but I’ve noticed that if I start the pipeline with, say, 4 streams (with batch-size set to 4), and then later dynamically remove 1 or more streams while also updating the streammux with the appropriate batch-size value, I see the same 5fps drop.

Any help or insight would be greatly appreciated.

Thank you.

  1. Have you set “live-source” property of nvstreammux as 1 for live sources? Gst-nvstreammux — DeepStream documentation 6.4 documentation
  2. Have you followed the instruction DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums to set “batched-push-timeout” property of nvstreammux?

Thanks, #2 was the answer (I had already done #1).

Given how common this issue looks to be (I can see similar issues on this forum but phrased differently so as not to make it immediately obvious), I’m a bit surprised it isn’t linked from the streammux documentation.

Regardless, thank you for your your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.