# Why my pipeline is stuck and delayed, but deepstream-app is very smooth?

**URL:** <https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841>\
**Category:** DeepStream SDK\
**Created:** [October 25, 2022, 3:20pm UTC](https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841 "2022-10-25T15:20:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![autodrive2022](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/autodrive2022/32/231070_2.png) [@autodrive2022](https://forums.developer.nvidia.com/u/autodrive2022)\
**Post date:** [October 25, 2022, 3:20pm UTC](https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841/1 "2022-10-25T15:20:00Z")

</div>

I tested the code of deepstream-app to load the model of yolov5s.  
At the same time I built my own pipeline based on deepstream-test3, but I found that my video detection was very stuck, where the configuration I set by referring to the configuration file of deepstream-app.  
Does deepstream-app have some buffering optimizations?

---

<div class="post-metadata">

**Author:** ![yingliu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yingliu/32/136703_2.png) [@yingliu](https://forums.developer.nvidia.com/u/yingliu)\
**Post date:** [October 26, 2022, 1:44am UTC](https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841/2 "2022-10-26T01:44:06Z")

</div>

Please provide complete information as applicable to your setup and your pipeline description:  
• Hardware Platform (Jetson / GPU)  
• DeepStream Version  
• JetPack Version (valid for Jetson only)  
• TensorRT Version  
• NVIDIA GPU Driver Version (valid for GPU only)  
• Issue Type( questions, new requirements, bugs)  
• 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)  
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)  
• The pipeline being used

---

<div class="post-metadata">

**Author:** ![autodrive2022](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/autodrive2022/32/231070_2.png) [@autodrive2022](https://forums.developer.nvidia.com/u/autodrive2022)\
**Post date:** [October 26, 2022, 1:46am UTC](https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841/4 "2022-10-26T01:46:10Z")

</div>

- deepstream-app version 6.1.0
- DeepStreamSDK 6.1.0
- CUDA Driver Version: 11.4
- CUDA Runtime Version: 11.0
- TensorRT Version: 8.2
- cuDNN Version: 8.4
- libNVWarp360 Version: 2.0.1d3
- Device on A6000

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [October 27, 2022, 3:15am UTC](https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841/5 "2022-10-27T03:15:00Z")

</div>

Hi @autodrive2022 ,

> Does deepstream-app have some buffering optimizations?  
> I don’t think there is special optimization.

Could you refer to this sample to measure the latency of the GST components?

> [@DeepStream SDK FAQ](https://forums.developer.nvidia.com/t/deepstream-sdk-faq/80236/12):
>
> 7. [DS 5.0GA\_All\_App] Enable Latency measurement for deepstream sample apps If you are using deepstream-app, to check the component latency directly, you need to set the env export NVDS\_ENABLE\_COMPONENT\_LATENCY\_MEASUREMENT=1 export NVDS\_ENABLE\_LATENCY\_MEASUREMENT=1 If you are using other deepstream sample apps such as deepstream-test3, you need to apply the following patch and set the env export NVDS\_ENABLE\_COMPONENT\_LATENCY\_MEASUREMENT=1 export NVDS\_ENABLE\_LATENCY\_MEASUREMENT=1 …

---

<div class="post-metadata">

**Author:** ![autodrive2022](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/autodrive2022/32/231070_2.png) [@autodrive2022](https://forums.developer.nvidia.com/u/autodrive2022)\
**Post date:** [October 27, 2022, 7:36am UTC](https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841/7 "2022-10-27T07:36:43Z")

</div>

I have modified the deepstream-test3 program, and after running it,  
no box is displayed and printed out the results like this：

```auto
************BATCH-NUM = 41**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856167763.085938 out_system_timestamp = 1666856167763.748047 component latency= 0.662109
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 41 in_system_timestamp = 1666856167763.829102 out_system_timestamp = 1666856167763.986084 component_latency = 0.156982
Comp name = primary-nvinference-engine in_system_timestamp = 1666856167764.033936 out_system_timestamp = 1666856167764.889893 component latency= 0.855957
Comp name = nvtiler in_system_timestamp = 1666856167764.944092 out_system_timestamp = 1666856167765.343018 component latency= 0.398926
Comp name = nvvideo-converter in_system_timestamp = 1666856167765.561035 out_system_timestamp = 1666856167765.716064 component latency= 0.155029
Comp name = nv-onscreendisplay in_system_timestamp = 1666856167765.833008 out_system_timestamp = 1666856167765.847900 component latency= 0.014893
Source id = 0 Frame_num = 41 Frame latency = 2.807129 (ms) 

************BATCH-NUM = 42**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856167842.747070 out_system_timestamp = 1666856167846.197998 component latency= 3.450928
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 42 in_system_timestamp = 1666856167846.235107 out_system_timestamp = 1666856167846.388916 component_latency = 0.153809
Comp name = primary-nvinference-engine in_system_timestamp = 1666856167846.506104 out_system_timestamp = 1666856167853.613037 component latency= 7.106934
Comp name = nvtiler in_system_timestamp = 1666856167853.754883 out_system_timestamp = 1666856167857.861084 component latency= 4.106201
Comp name = nvvideo-converter in_system_timestamp = 1666856167858.092041 out_system_timestamp = 1666856167860.152100 component latency= 2.060059
Comp name = nv-onscreendisplay in_system_timestamp = 1666856167860.270996 out_system_timestamp = 1666856167860.284912 component latency= 0.013916
Source id = 0 Frame_num = 42 Frame latency = 17.585938 (ms) 

************BATCH-NUM = 43**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856167924.729004 out_system_timestamp = 1666856167929.532959 component latency= 4.803955
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 43 in_system_timestamp = 1666856167929.616943 out_system_timestamp = 1666856167929.775879 component_latency = 0.158936
Comp name = primary-nvinference-engine in_system_timestamp = 1666856167929.823975 out_system_timestamp = 1666856167936.742920 component latency= 6.918945
Comp name = nvtiler in_system_timestamp = 1666856167936.896973 out_system_timestamp = 1666856167941.375977 component latency= 4.479004
Comp name = nvvideo-converter in_system_timestamp = 1666856167941.607910 out_system_timestamp = 1666856167943.681885 component latency= 2.073975
Comp name = nv-onscreendisplay in_system_timestamp = 1666856167943.801025 out_system_timestamp = 1666856167943.815918 component latency= 0.014893
Source id = 0 Frame_num = 43 Frame latency = 19.133057 (ms) 

************BATCH-NUM = 44**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856168013.827881 out_system_timestamp = 1666856168014.311035 component latency= 0.483154
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 44 in_system_timestamp = 1666856168014.347900 out_system_timestamp = 1666856168014.500977 component_latency = 0.153076
Comp name = primary-nvinference-engine in_system_timestamp = 1666856168014.614990 out_system_timestamp = 1666856168015.392090 component latency= 0.777100
Comp name = nvtiler in_system_timestamp = 1666856168015.520020 out_system_timestamp = 1666856168015.728027 component latency= 0.208008
Comp name = nvvideo-converter in_system_timestamp = 1666856168015.934082 out_system_timestamp = 1666856168016.008057 component latency= 0.073975
Comp name = nv-onscreendisplay in_system_timestamp = 1666856168016.129883 out_system_timestamp = 1666856168016.144043 component latency= 0.014160
Source id = 0 Frame_num = 44 Frame latency = 2.363037 (ms) 

************BATCH-NUM = 45**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856168092.749023 out_system_timestamp = 1666856168096.949951 component latency= 4.200928
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 45 in_system_timestamp = 1666856168097.033936 out_system_timestamp = 1666856168097.187012 component_latency = 0.153076
Comp name = primary-nvinference-engine in_system_timestamp = 1666856168097.233887 out_system_timestamp = 1666856168104.199951 component latency= 6.966064
Comp name = nvtiler in_system_timestamp = 1666856168104.336914 out_system_timestamp = 1666856168108.649902 component latency= 4.312988
Comp name = nvvideo-converter in_system_timestamp = 1666856168108.876953 out_system_timestamp = 1666856168110.936035 component latency= 2.059082
Comp name = nv-onscreendisplay in_system_timestamp = 1666856168111.058105 out_system_timestamp = 1666856168111.072998 component latency= 0.014893
Source id = 0 Frame_num = 45 Frame latency = 18.369873 (ms) 

```

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [October 28, 2022, 3:05am UTC](https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841/8 "2022-10-28T03:05:11Z")

</div>

**There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one.  
Thanks**

From above log, the frame latency is ~19ms, do you still see stuck with 19ms frame latency ?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [November 29, 2022, 5:34am UTC](https://forums.developer.nvidia.com/t/why-my-pipeline-is-stuck-and-delayed-but-deepstream-app-is-very-smooth/231841/10 "2022-11-29T05:34:42Z")

</div>

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