rtspsrc cpu optimization

Eloi Bail eloi.bail at gmail.com
Tue Oct 21 15:55:55 PDT 2014


I manage to have significant CPU consumption improvement reducing
frequency of RTP reading.
In gst_base_src_loop I added a 1ms sleep before calling gst_base_src_get_range.

My CPU consumption is then divided by 2 : 8-10% to 3-4%. The result
(my mkv recorded file) looks ok.

Reducing reading frequency, we are using bigger buffers and pushing
them less frequently. It also explains why I saw lot of time passed in
gst_pad_push using profilers and also why removing mutex improved
performance (pads were on use all the time and thus mutexs locked too)

This workaround is dirty and I want to understand how to reduce socket
reading frequency. Do you see a way to change it ?

Notice also that kernel socket size might be increased too.


More information about the gstreamer-devel mailing list