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=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 6F223BB84 for ; Tue, 29 Jul 2008 15:57:42 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au0BAMi+jkjAXQIniGdsb2JhbACSVgEBAQ8gnWc X-IronPort-AV: E=Sophos;i="4.31,272,1215381600"; d="scan'208";a="27778421" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 Jul 2008 15:57:29 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m6TDvTO8004468 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 29 Jul 2008 15:57:29 +0200 X-IronPort-AV: E=Sophos;i="4.31,272,1215381600"; d="scan'208";a="15611612" Received: from 250-96.msr-inria.inria.fr ([193.55.250.96]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA; 29 Jul 2008 15:57:29 +0200 Message-Id: From: Damien Doligez To: caml users Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: [Caml-list] Manually triggering garbage collection Date: Tue, 29 Jul 2008 15:57:29 +0200 References: <86F95E46-EF71-47F9-AE76-D765225CB597@inria.fr> X-Mailer: Apple Mail (2.926) X-Miltered: at concorde with ID 488F21C9.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; damien:01 damien:01 krivine:01 overkill:01 doligez:01 doligez:01 garbage:01 wrote:01 heap:01 heap:01 caml-list:01 parameter:02 seems:03 overhead:04 overhead:04 On 2008-07-29, at 15:39, Jean Krivine wrote: > OK great I' ll try, > For the moment I just set a Gc alarm that detects whether memory usage > is above a certain limit and if so, sets the overhead to 0, which > stops completely the memory "leak". Setting the overhead to 0 seems a bit overkill. You might want to do a Gc.compact() at this point. Or you might just need to change the max_overhead parameter: the lower it is, the more often the GC will compact the heap. > Do you think that would improve to increase the size of the major > heap? Yes, sometimes it helps with fragmentation. Also, increasing the heap_increment may help. > Also, do you know how often the alarm is tested? is it each time a > major collection is performed? The GC alarms are triggered at the end of each major collection. -- Damien