Browse thread
memory usage
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Sylvain Le Gall <sylvain@l...> |
| Subject: | Re: memory usage |
On 12-01-2009, John Lepikhin <john@ispsystem.com> wrote: >> 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. > 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