#225: Too high memory usage in Buffer.generator
-------------------------+--------------------------------------------------
Reporter: toots | Owner: admin
Type: Bugs | Status: new
Priority: 6 | Milestone: 0.9.0
Component: Liquidsoap | Version: 0.9.0+svn
Resolution: | Keywords:
Mac: 1 | Linux: 1
Netbsd: 1 | Other: 1
Freebsd: 1 |
-------------------------+--------------------------------------------------
Comment (by toots):
Ok, let me try to explain this issue more in details. If I prepare a
buffer of 600 seconds, which is 10 minutes, I need to cache exactly
{{{26460000}}} samples at {{44.100 Hz}}.
Each sample contains audio data for 2 channels and each channel sample is
2 bytes. Hence, a total of 4 bytes per samples.
As a consequence, the total buffered data should be about {{{100Mo}}}.
However, when checking memory usage of liquidsoap when running, I get
almost {{{800Mo}}}. I don't think a factor 8 is only an issue of, let say,
OCaml Gc overhead or anything else. There must be something else to
justify such a big memory usage.
I have tried to force a {{{Gc.full_major}}} when the buffer is full, this
doesn't help. I have also tried to rewrite a naive {{{Queue}}} module, and
I get the same memory usage, such that the {{{Queue}}} module cannot be
responsible...
I now start to wonder wether this high memory usage could also be the
responsible for latency and hicups that occur from times to times with the
crossfade. Indeed, when growing quickly in time when buffering end and
begining of old and new tracks, a too high memory usage should trigger the
{{{Gc}}}, which may then generate an extra latency from time to time..
Any ideas on this topic ? Is it possible to monitor the memory usage of a
given object in OCaml ?
--
Ticket URL: <http://savonet.rastageeks.org/ticket/225#comment:2>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac