After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728714 - rtpsession: RTP/RTCP causes high load
rtpsession: RTP/RTCP causes high load
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.2.3
Other Linux
: Normal blocker
: 1.2.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-22 10:28 UTC by Marc Leeman
Modified: 2014-05-19 16:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marc Leeman 2014-04-22 10:28:25 UTC
When receiving an RTP/RTCP stream, a very high load is triggered in releases.

We have been using until recently 1.0.7 and for a 11 Mbps stream about 4% was used on the reference platform.

When bumping to 1.2.3; the load for the same stream was +100%.

This issue was fixed in the master.

We did a bisect to isolate the commit that solves it between 1.2.3 and master and the following commit resolves the load issue.


(jhbuild)marc@drd1812:~/gstreamer.jhbuild/sources/gst-plugins-good-1.0-upstream$ git bisect good
6a421c3d81b74b808dcc67886cdf5a28b8bc1f41 is the first bad commit
commit 6a421c3d81b74b808dcc67886cdf5a28b8bc1f41
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Thu Dec 12 10:32:48 2013 +0100

    rtpsession: reset state after scheduling BYE
    
    After we do RTCP, we are not scheduling bye anymore.

:040000 040000 1b3c2b7a10000d11b9c79fdea3e777e7afee95c0 38f76abaf49430cfab8d6949eaa3705febfd8693 M	gst

Indeed:

$ git checkout 6a421c3d81b74b808dcc67886cdf5a28b8bc1f41

gives us a good behaviour

$ git checkout 0a0ff100efe0960639c31216390321c19aa6dd3c

gives us a bad behaviour

(jhbuild)marc@drd1812:~/gstreamer.jhbuild/sources/gst-plugins-good-1.0-upstream$ git diff 0a0ff100efe0960639c31216390321c19aa6dd3c 6a421c3d81b74b808dcc67886cdf5a28b8bc1f41
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
index 1074866..929c404 100644
--- a/gst/rtpmanager/rtpsession.c
+++ b/gst/rtpmanager/rtpsession.c
@@ -3614,6 +3614,7 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time,
     sess->last_rtcp_send_time = data.current_time;
   sess->first_rtcp = FALSE;
   sess->next_early_rtcp_time = GST_CLOCK_TIME_NONE;
+  sess->scheduled_bye = FALSE;
 
 done:
   RTP_SESSION_UNLOCK (sess);
Comment 1 Wim Taymans 2014-05-14 13:56:13 UTC
commit c5a612bbd35e2114cf9efbf09f0f60b16d576925
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Thu Dec 12 10:32:48 2013 +0100

    rtpsession: reset state after scheduling BYE
    
    After we do RTCP, we are not scheduling bye anymore.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728714
Comment 2 Marc Leeman 2014-05-19 09:32:24 UTC
I did a rebuild of the 1.2.3 with the patch included, and the load still consumes entire core.

When doing this; I noticed that I already applied all of George's patches in a previous phase; but I reset the branch again to the 1.2.3 (clean).

I can try with the 1.2.4 with the patch applied; but I don't think that will change anything.
Comment 3 Marc Leeman 2014-05-19 16:05:49 UTC
local build system did not apply selected patch.