Version française
Home     About     Download     Resources     Contact us    
Browse thread
memory usage
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Lepikhin <john@i...>
Subject: Re: [Caml-list] memory usage
> Starting point should be to call this periodically:
> 
>       Gc.compact ();
>       let stat = Gc.stat () in
>       let live_words = stat.Gc.live_words in
>       eprintf "live words %d\n%!" live_words;
> 
> which will tell you how many words (ie 4 or 8 byte chunks) are
> reachable according to the garbage collector.

Richard, here is result (statistics was saved every 10 seconds):

live words - RSS:

186980 - 12380KB <-- after first 10 seconds of work
154156 - 18232KB
153923 - 19648KB
...
after 10 minutes of work:
203842 - 33436KB
170559 - 33528KB
187018 - 33664KB
71626 - 33592KB

Sometimes live words drops down to 40.000. But RSS always stay near
30-50MB.