mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
High Memory Consumption - 180 MB #135
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @josecasillas on GitHub (Apr 19, 2016).
Originally assigned to: @Abhinav95 on GitHub.
Shelling out ccextractor instances on Linux from an app to process parallel streams. Feeding low-bit-rate video via stdin, using stream mode, disabled input buffering, captions going into stdout. Seems each instance occupies a fixed amount of ~180 MB of RAM, severely limiting what we can accomplish on each box.
Is it possible to configure the size of internal buffers more modestly? Any insight into the 180 MB RAM footprint?
Thank you!
Jose
@Abhinav95 commented on GitHub (May 24, 2016):
I can confirm this issue. Every instance of ccextractor, (both Windows and Linux), occupies an amount of memory that ranges around 160-200 MB, depending on the parameters passed.
@cfsmp3 commented on GitHub (May 24, 2016):
So where does all this memory go? :-)
On Tue, May 24, 2016 at 5:10 AM, Abhinav Shukla notifications@github.com
wrote:
@Abhinav95 commented on GitHub (May 25, 2016):
I am using valgrind to analyze memory allocation as the program runs.
The major problem is that 187477304 bytes (179.79 MB) of memory is allocated to
ctxin theinit_libraries()call at the beginning of the program frommain.sizeof(struct lib_ccx_ctx)returns 187477304.UPDATE:-
struct EIT_program eit_programs[TS_PMT_MAP_SIZE+1]has a size of 185795585, which is the problem.This happens because EPG data for 60 days (60_24_7) is allocated every time the program is run, which should not be the case and wastes around 180 MB memory.
@Abhinav95 commented on GitHub (May 26, 2016):
#373 fixes this issue.
@josecasillas You should expect a memory usage of atmost 25 MB per instance from now on, except for when passing the '-xmltv' parameter which will give memory usage around 200 MB(which I don't think you are using because you described just caption output to stdout). Good luck for your application :)
@josecasillas commented on GitHub (May 27, 2016):
I can't thank you enough. Great job on this, and fast turn around. Thank you my friend!
@josecasillas commented on GitHub (May 27, 2016):
Tested today with the new build and I'm seeing < 5 MB per instance! Memory no longer the limiting factor. Thanks again!
@cfsmp3 commented on GitHub (May 27, 2016):
Great job Abhinav !
On Fri, May 27, 2016 at 10:47 AM, josecasillas notifications@github.com
wrote: