Version française
Home     About     Download     Resources     Contact us    
Browse thread
Memory cost of a compaction
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Baelde <david.baelde@g...>
Subject: Memory cost of a compaction

I have a program which memory consumption slowly increases (say from
6M to 8M resident set size, the total size being around 67M), and then
at some point after like 10 hours, suddenly exploses to 100M (rss) and
more until it crashes because of the lack of memory.

I've been tracking the problem for days. I found some memory leaks in
C bindings, but it doesn't explain the explosion which indeed still
happens. Using ocaml-memprof I could see that the number and size of
values is normal.

But I'm now wondering if after 10 hours a compaction could be
triggered because of fragmentation. I believe that a compaction would
allocate some memory in order to move data around, could it be the
cause for my explosion ? My question is: in the worst case, how much
memory can be needed for compaction ?

Thanks for any details about compaction -- pr any idea about this explosion.

PS: I know that I can trigger compaction manually, and log compactions
-- heap extensions are interesting too. I'll do that in the next run.