[i.MX6]memory leak of Gstreamer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[i.MX6]memory leak of Gstreamer

ソリューションへジャンプ
3,155件の閲覧回数
tongchunyang
Contributor III

Hi, community

As use the playbin2 of gstreamer to play a local video file(Video:1080p/mp4/size:980MB  CMD:gst-launch playbin2 uri=file:///home/username/001.mp4 ) ,
We find that cachedcontinuously rise until the whole physical memory is nearly occupied.
We suspect that video cache occupy the memory continuously, which result in that our other background process cannot obtain the memory.

how can We expect that video cache do not occupy the memory whenever possible or stipulate the size of memory for video cache, when playbin2 play local video smoothly?

■environment

imx6: dual lite

DDR: 512MB * 2

Gstreamer Version:

gst-fsl-plugins-3.0.7

gst-plugins-gl-0.10.3.1

gst-plugins-base0.10_0.10.35

gst-plugins-good0.10_0.10.30

gstreamer0.10_0.10.35

libfslcodec-3.0.7

libfslmscodec-3.0.7

libfslparser-3.0.7

libfslvpuwrap-1.0.35

libfslmsparser-3.0.7

ラベル(3)
タグ(1)
0 件の賞賛
1 解決策
1,474件の閲覧回数
tongchunyang
Contributor III

Thank you for your reply.

When we play the video, the other process in the background may use cache to read-write the file.

$ echo 1 >/proc/sys/vm/lowmem_reserve_ratio will cause that the processing data will be deleted.

We expect to solve the problems through the following measures:

Limit the maximal size of cache that video can use or only delete the cache video used.

Others, we try to perform $ echo 1 >/proc/sys/vm/drop_caches by the script of while1 in playing video.

The memory will not rise continuously and can play video normally.

Does this mean that it does not actually require a mass of memory for video cache when gstreamer is playing the local video?

Yours Sincerely,

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
1,474件の閲覧回数
Yuri
NXP Employee
NXP Employee

I remember the following limitation :

   When playing the video for a long time, allocation of contiguous memory may fail

(memory fragmentation).

   To play video when the system memory is low, run the command:

$ echo 1 >/proc/sys/vm/lowmem_reserve_ratio

   It protects the DMA zone and avoids memory allocation errors.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
1,475件の閲覧回数
tongchunyang
Contributor III

Thank you for your reply.

When we play the video, the other process in the background may use cache to read-write the file.

$ echo 1 >/proc/sys/vm/lowmem_reserve_ratio will cause that the processing data will be deleted.

We expect to solve the problems through the following measures:

Limit the maximal size of cache that video can use or only delete the cache video used.

Others, we try to perform $ echo 1 >/proc/sys/vm/drop_caches by the script of while1 in playing video.

The memory will not rise continuously and can play video normally.

Does this mean that it does not actually require a mass of memory for video cache when gstreamer is playing the local video?

Yours Sincerely,

0 件の賞賛
1,474件の閲覧回数
Yuri
NXP Employee
NXP Employee

Looks like memory fragmentation is the main issue.
You can try Yocto release, where situation should be – at least – less critical.


~Yuri.