From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 1432DBC0A for ; Sat, 2 Dec 2006 16:34:06 +0100 (CET) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kB2FY5E1028057 for ; Sat, 2 Dec 2006 16:34:05 +0100 Received: by nf-out-0910.google.com with SMTP id m19so3688480nfc for ; Sat, 02 Dec 2006 07:34:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=A9vxXGKHPcN2LpEpbLJyKy3NLhqqc89AoCZTrpGTAnMUSWORn52pw8sXX865JM/ILi8MPMqpvycCMsHskaj56LrbEVyV+Hn6NAvkhyovO6u13RGfefU6+8LDq5htgMIRm6+meZNBlwlrpi8hgrip0+WFKRuVBqSCKMQo5Ugq7tk= Received: by 10.82.169.4 with SMTP id r4mr1215459bue.1165073644913; Sat, 02 Dec 2006 07:34:04 -0800 (PST) Received: by 10.82.140.13 with HTTP; Sat, 2 Dec 2006 07:34:04 -0800 (PST) Message-ID: <53c655920612020734q4272cb9em5311c3ec3ea14ab2@mail.gmail.com> Date: Sat, 2 Dec 2006 16:34:04 +0100 From: "David Baelde" Reply-To: david.baelde@ens-lyon.org To: Ocaml Subject: Memory cost of a compaction MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-j-chkmail-Score: MSGID : 45719CED.001 on discorde : j-chkmail score : X : 0/20 1 X-Miltered: at discorde with ID 45719CED.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; compaction:01 bindings:01 compaction:01 compactions:01 resident:98 heap:01 data:02 crashes:03 size:95 size:95 leaks:04 triggered:05 problem:05 allocate:06 indeed:07 Hi, 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. -- David 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.