caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Understanding usage by the runtime
@ 2011-12-30 23:45 orbitz
  2011-12-31  9:11 ` David Baelde
  0 siblings, 1 reply; 16+ messages in thread
From: orbitz @ 2011-12-30 23:45 UTC (permalink / raw)
  To: Caml List

I am running a fork of mfp's ocamlmq.  I am trying to track down an apparent memory leak, after a week of heavy usage the process is using up 2GB of RAM, and after looking in all the obvious places (all of the containers tracked in the state object in the mq appear to be empty or steady in their size, including queues, data is moving in and out of them but not accumulating, memory consumption should be nearly O(1)) I decided to see what the gc could tell me.  I've been printing out gc stats and am wondering if someone can help me grok how the runtime works.  In this case I'm trying to compare top to what the gc says.  The exact values are below, but the essence of it is that top states the process is using 238m of RAM whereas the gc states that the heap size is about 66megs.  My understanding is that the heap size is the total amount of memory that the runtime has under its supervision.

I am running Ubuntu Linux on a 64bit virtual machine running in VMWare on an Ubuntu Linux OS.

My questions are:
- Is top untrustworthy here?  Or is the heap_words value not the full story?
- Are there any tools that make it easier for me to track down memory leaks?

Thank you

Top:
VIRT = 250m
RES = 238m


GC:
Heap size according to gc output = 66536k

minor_words: 6843117723
promoted_words: 271790582
major_words: 1752005911
minor_collections: 210261
major_collections: 2358
heap_words: 8516608
heap_chunks: 16
top_heap_words: 30736896
live_words: 6936631
live_blocks: 1083582
free_words: 1579967
free_blocks: 1457
largest_free: 399643
fragments: 10
compactions: 465



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-01-09 21:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-30 23:45 [Caml-list] Understanding usage by the runtime orbitz
2011-12-31  9:11 ` David Baelde
2011-12-31 15:33   ` orbitz
2012-01-01 12:44     ` Richard W.M. Jones
2012-01-04 18:03       ` Damien Doligez
2012-01-04 18:48         ` Adrien
2012-01-04 19:37           ` John Carr
2012-01-07  5:43       ` orbitz
2012-01-08 18:45         ` Richard W.M. Jones
2012-01-08 19:00           ` Richard W.M. Jones
2012-01-08 22:33             ` Török Edwin
2012-01-09 14:31               ` Richard W.M. Jones
2012-01-09 21:07                 ` Richard W.M. Jones
2012-01-08 22:50           ` orbitz
2012-01-08 23:02             ` Richard W.M. Jones
2012-01-08 23:26               ` orbitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).