aswathisivan
Posts: 2
Joined: Wed Oct 03, 2018 10:02 am

OOM issue with gstreamer

Wed Oct 03, 2018 10:25 am

I am using raspberry pi 3B which has linux distribution built using yocto (https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/). I took the meta raspberry from https://git.yoctoproject.org/cgit/cgit. ... rypi/tree/. I have included the recipe to include gstreamer 1.14.2.

Code: Select all

bitbake rpi-basic-image
Pipeline which I used for all the cameras:
gst-launch-1.0 -e rtspsrc location="rtsp://<username:[email protected]>" name = d \
! rtph264depay ! h264parse ! splitmuxsink name = mux location=~/media/a1_video%02d.mp4 max-size-time=2000000000 max-files=5 &

Behaviour:
  • When I am video streaming 4 IP cameras simultaneously using gstreamer the RAM usage is going till 500 MB.
  • When I do the video streaming with 10 IP cameras the RAM is getting completely utilized and OOM_killer is invoked to kill the pipeline.
I have ran the same pipeline in raspbian OS for 10 IP cameras, but in this the RAM usage doesnt go beyond 280MB.

Why the RAM is growing and exhausted in yocto built Linux distro ? Any help or clue is much appreciated.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20752
Joined: Sat Jul 30, 2011 7:41 pm

Re: OOM issue with gstreamer

Wed Oct 03, 2018 10:42 am

Check the version of the gstreamer modules you are using - sounds like they are different to the Raspbian supplied ones.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

aswathisivan
Posts: 2
Joined: Wed Oct 03, 2018 10:02 am

Re: OOM issue with gstreamer

Thu Oct 04, 2018 7:12 am

Hello,

Thanks for helping me out.

In yocto built Linux I am using gstreamer-1.14.2. The Raspbian by default installs gstreamer-1.10.4, So I had tried the pipelines with gst-uninstalled 1.14.2 in Raspbian. The Raspbian behaves the same in both the versions, So I am assuming the version is not making any difference.

Also to check if in Raspbian also the OOM issue can happen over the time, I had left the 10 IP camera pipelines running overnight. The RAM usage has grown from 280 MB to 440 MB. But since last 2 hours it is holding to that level. Below is free command output :

Code: Select all

              total        used        free      shared  buff/cache   available
Mem:         949452      436456       92224       13736      420772      446476
Swap:        102396           0      102396
Any major difference between Yocto and Raspbian which could explain this RAM behaviour? Or any suggestions what other tests I can perform to get more data?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20752
Joined: Sat Jul 30, 2011 7:41 pm

Re: OOM issue with gstreamer

Thu Oct 04, 2018 8:57 am

aswathisivan wrote:
Thu Oct 04, 2018 7:12 am
Hello,

Thanks for helping me out.

In yocto built Linux I am using gstreamer-1.14.2. The Raspbian by default installs gstreamer-1.10.4, So I had tried the pipelines with gst-uninstalled 1.14.2 in Raspbian. The Raspbian behaves the same in both the versions, So I am assuming the version is not making any difference.

Also to check if in Raspbian also the OOM issue can happen over the time, I had left the 10 IP camera pipelines running overnight. The RAM usage has grown from 280 MB to 440 MB. But since last 2 hours it is holding to that level. Below is free command output :

Code: Select all

              total        used        free      shared  buff/cache   available
Mem:         949452      436456       92224       13736      420772      446476
Swap:        102396           0      102396
Any major difference between Yocto and Raspbian which could explain this RAM behaviour? Or any suggestions what other tests I can perform to get more data?
We don't use Yocto, so have really no idea how to compare the two.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Return to “Linux Kernel”