<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/593f14a13f6cfc4cafb1b283c45ddaa6"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2009-01-12T10:45:44"
  subject="Re: memory usage"
  prev="2009/01/2549cd673119c567f7c38185b8f44404"
  next="2009/01/c46a7815fd8b38524a6d61062255bb6a"
  prev-in-thread="2009/01/3ffffb747e8fb2737d56d6f15906a6a2"
  next-in-thread="2009/01/c46a7815fd8b38524a6d61062255bb6a"
  prev-thread="2009/01/df2de1846d5559d3faa62662b822bba6"
  next-thread="2009/01/5bb736622b71197f45b645c4e626de56"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="memory usage">
<msg 
  url="2009/01/bdb3d4c35cff66ea7be1c275b5f87645"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T07:41:53"
  subject="memory usage">
<msg 
  url="2009/01/e4eaf4f820bcc524d576bbc14d55acea"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-01-12T08:39:16"
  subject="Re: [Caml-list] memory usage">
<msg 
  url="2009/01/3ffffb747e8fb2737d56d6f15906a6a2"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T09:14:13"
  subject="Re: [Caml-list] memory usage">
<msg 
  url="2009/01/593f14a13f6cfc4cafb1b283c45ddaa6"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2009-01-12T10:45:44"
  subject="Re: memory usage">
<msg 
  url="2009/01/c46a7815fd8b38524a6d61062255bb6a"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T11:28:21"
  subject="[Caml-list] Re: memory usage">
<msg 
  url="2009/01/56bab8bd7437a13d82231cb7b0f7123e"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-01-12T11:41:31"
  subject="Re: [Caml-list] Re: memory usage">
<msg 
  url="2009/01/b49c746cd7aade6ef27fa16971c513af"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T15:03:40"
  subject="Re: [Caml-list] Re: memory usage">
<msg 
  url="2009/01/857b0402f61e849b3d54008d0a34c8ff"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-01-12T19:55:25"
  subject="Re: [Caml-list] Re: memory usage">
</msg>
</msg>
<msg 
  url="2009/01/a0bda203ac057a468832f4734e9d297a"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T17:57:13"
  subject="Re: [Caml-list] Re: memory usage">
<msg 
  url="2009/01/6964c5f12939a3533765c4eeca1c659a"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-01-12T20:12:20"
  subject="Re: [Caml-list] Re: memory usage">
<msg 
  url="2009/01/f780bfd50b3219200f52cd0238ca708b"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T21:34:37"
  subject="Re: [Caml-list] Re: memory usage">
<msg 
  url="2009/01/dce041a4fbff95ebf478e0c47dc4fe06"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-01-12T22:01:31"
  subject="Re: [Caml-list] Re: memory usage">
<msg 
  url="2009/01/5f78645d7a4e6fa8b81fb7463499c76e"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-13T16:01:29"
  subject="Re: [Caml-list] Re: memory usage">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2009/01/e3d8df8aa8dc8aaa7e53b7f77dd8ffd3"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T15:05:50"
  subject="Re: [Caml-list] memory usage">
</msg>
<msg 
  url="2009/01/727ffcb417322fa6253f028466ffca77"
  from="Florian Hars &lt;hars@b...&gt;"
  author="Florian Hars"
  date="2009-01-12T16:29:35"
  subject="Re: [Caml-list] memory usage">
<msg 
  url="2009/01/8dbf9add071cbdba9d0de2236b19ec61"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T16:44:54"
  subject="Re: [Caml-list] memory usage">
<msg 
  url="2009/01/4e5dda7ad406ebd71375072454f7dcb8"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2009-01-12T17:55:37"
  subject="Re: memory usage">
<msg 
  url="2009/01/3e3b7d53accdc38893eac2582d8904f0"
  from="John Lepikhin &lt;john@i...&gt;"
  author="John Lepikhin"
  date="2009-01-12T18:02:02"
  subject="Re: [Caml-list] Re: memory usage">
<msg 
  url="2009/01/66abfef8939863574be285ef81b22ca2"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2009-01-12T18:26:51"
  subject="Re: memory usage">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
On 12-01-2009, John Lepikhin &lt;john@ispsystem.com&gt; wrote:
&gt;&gt; Starting point should be to call this periodically:
&gt;&gt; 
&gt;&gt;       Gc.compact ();
&gt;&gt;       let stat = Gc.stat () in
&gt;&gt;       let live_words = stat.Gc.live_words in
&gt;&gt;       eprintf "live words %d\n%!" live_words;
&gt;&gt; 
&gt;&gt; which will tell you how many words (ie 4 or 8 byte chunks) are
&gt;&gt; reachable according to the garbage collector.
&gt;
&gt; Richard, here is result (statistics was saved every 10 seconds):
&gt;
&gt; live words - RSS:
&gt;
&gt; 186980 - 12380KB &lt;-- after first 10 seconds of work
&gt; 154156 - 18232KB
&gt; 153923 - 19648KB
&gt; ...
&gt; after 10 minutes of work:
&gt; 203842 - 33436KB
&gt; 170559 - 33528KB
&gt; 187018 - 33664KB
&gt; 71626 - 33592KB
&gt;
&gt; Sometimes live words drops down to 40.000. But RSS always stay near
&gt; 30-50MB.
&gt;

To get real memory used, (Sys.word_size * live_word / 8). Do you use
out-of-heap datastructure that can use memory ? (malloc-ed
datastructure).

Regards,
Sylvain Le Gall

</contents>

</message>

