python memory leak - update - matroskamux memory leak

Bram Van Steenlandt bram at diomedia.be
Fri Mar 18 09:41:29 UTC 2016


Hi,

Op 18-03-16 om 09:55 schreef Sebastian Dröge:
> On Do, 2016-03-17 at 20:37 +0100, Bram Van Steenlandt wrote:
>> Hi,
>>
>> An update on the situation:
>> -I replaced the matroskamux with multipartmux, it now has been
>> running for 20 hours and seems stable (at 380 MB for 9 streams).
> For matroskamux, did you set streamable=false? If it's not set to
> false, matroskamux will create a seek table and that's going to consume
> more and more memory over time. And in the end it would try writing
> this seek table out, which is a bit useless when streaming the media.
No, I did not, I should have.
This night I had another memory leak (after running ok for over 12 
hours), not sure if it's the same issue or a new one.
With the matroskamux if it started it was like this:
cam 2 -> 2016/3/16    3:53:26    Playing started (ASYNC DONE)
cam MEM -> 2016/3/16    3:53:29    Memory usage jumped to 220.85 MB
cam MEM -> 2016/3/16    4:14:4    Memory usage jumped to 256.22 MB
cam MEM -> 2016/3/16    5:57:39    Memory usage jumped to 294.7 MB
cam MEM -> 2016/3/16    6:19:4    Memory usage jumped to 352.4 MB
cam MEM -> 2016/3/16    6:20:9    Memory usage jumped to 413.34 MB
cam MEM -> 2016/3/16    6:20:14    Memory usage jumped to 459.5 MB
cam MEM -> 2016/3/16    6:20:24    Memory usage jumped to 493.61 MB
cam MEM -> 2016/3/16    6:20:29    Memory usage jumped to 531.62 MB
cam MEM -> 2016/3/16    6:20:44    Memory usage jumped to 578.13 MB
cam MEM -> 2016/3/16    6:20:54    Memory usage jumped to 610.66 MB
cam MEM -> 2016/3/16    6:21:19    Memory usage jumped to 648.69 MB
cam MEM -> 2016/3/16    6:21:29    Memory usage jumped to 684.39 MB
cam MEM -> 2016/3/16    6:21:39    Memory usage jumped to 720.0 MB
cam MEM -> 2016/3/16    6:21:49    Memory usage jumped to 757.09 MB
cam MEM -> 2016/3/16    6:21:59    Memory usage jumped to 792.17 MB
thus, I lost 571MB in 2 hours and 28 minutes which is 3.85MB every minute.
This is more or less the amount of data being streamed by one camera.
I could see this being because of the streamable=false, I do find it 
strange that the other machine didn't have any issues but here it are 
different and less cameras and a more solid network...

Now, I had this (with the multipart mux):
cam 9 -> 2016/3/17    21:16:49    Playing started (ASYNC DONE)
cam MEM -> 2016/3/17    21:16:53    Memory usage jumped to 136.95 MB
cam MEM -> 2016/3/17    21:28:18    Memory usage jumped to 168.96 MB
cam MEM -> 2016/3/17    21:36:13    Memory usage jumped to 220.84 MB
cam MEM -> 2016/3/18    1:51:29    Memory usage jumped to 272.02 MB
cam MEM -> 2016/3/18    1:51:33    Memory usage jumped to 327.98 MB
cam MEM -> 2016/3/18    1:51:38    Memory usage jumped to 399.15 MB
cam MEM -> 2016/3/18    1:51:43    Memory usage jumped to 472.88 MB
cam MEM -> 2016/3/18    1:51:48    Memory usage jumped to 548.75 MB
cam MEM -> 2016/3/18    1:51:53    Memory usage jumped to 623.47 MB
cam MEM -> 2016/3/18    1:51:58    Memory usage jumped to 698.37 MB
cam MEM -> 2016/3/18    1:52:3    Memory usage jumped to 774.9 MB
cam MEM -> 2016/3/18    1:52:9    Memory usage jumped to 850.0 MB
cam MEM -> 2016/3/18    1:52:13    Memory usage jumped to 923.92 MB
cam MEM -> 2016/3/18    1:52:18    Memory usage jumped to 999.24 MB
cam MEM -> 2016/3/18    1:52:23    Memory usage jumped to 1074.46 MB
here, I lost 802MB in one minute, this feels like a different memory 
leak than the one above.
I have now added some code to try and stop all streams (set to null) to 
see if this frees up the memory in this case.

Bram





More information about the gstreamer-devel mailing list