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=2.8 required=5.0 tests=DNS_FROM_RFC_POST,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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 8BEE6BB84 for ; Tue, 29 Jul 2008 16:04:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogAALm/jkjRVYC8lGdsb2JhbACSE0MBAQEBCQMKBxEDmBCFRA X-IronPort-AV: E=Sophos;i="4.31,272,1215381600"; d="scan'208";a="15611939" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Jul 2008 16:04:31 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m6TE4UPD030408 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 29 Jul 2008 16:04:31 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogAALm/jkjRVYC8lGdsb2JhbACSE0MBAQEBCQMKBxEDmBCFRA X-IronPort-AV: E=Sophos;i="4.31,272,1215381600"; d="scan'208";a="15611938" Received: from fk-out-0910.google.com ([209.85.128.188]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Jul 2008 16:04:30 +0200 Received: by fk-out-0910.google.com with SMTP id e30so4970009fke.9 for ; Tue, 29 Jul 2008 07:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=B9V/9X7N2r/tGGpqiNN99fi8f8Yk83PoAwfWvn5anko=; b=oxyM4mfDaxBSj36/ebzJHNxwAd4heSCzAgoVAz7jU7wvAwZnPnRy5zA2xLecM7j5bf mMGwVl55O4cdLK3eEDmaJoKr6II0RefcByGJoNAweDL4l//TO/rZP1kxD8miPhuAcvdS qGQNwrk07SatGoVtS3NaAe4WqFhMPWftgDDZM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=momTNjISkBvpJWlXiAlNm+2Dhh5nszxhcMUQsi90DabqQ2/pp8+jyhH2KpI1ea8VCs nP4/vVyys3dxpMWuuFoQS2JxdssyM7Ga7MouePBc4cii1162y7RMxfCRAWFZs9F6C9FS D0+cVW4wY+mb3kmNjdm98+/U0bvqxESlsvApc= Received: by 10.180.227.4 with SMTP id z4mr2101668bkg.63.1217340270098; Tue, 29 Jul 2008 07:04:30 -0700 (PDT) Received: by 10.180.233.8 with HTTP; Tue, 29 Jul 2008 07:04:30 -0700 (PDT) Message-ID: Date: Tue, 29 Jul 2008 10:04:30 -0400 From: "Jean Krivine" To: "Damien Doligez" Subject: Re: [Caml-list] Manually triggering garbage collection Cc: "caml users" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <86F95E46-EF71-47F9-AE76-D765225CB597@inria.fr> X-Miltered: at discorde with ID 488F236E.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; krivine:01 krivine:01 damien:01 damien:01 overkill:01 beginner's:01 ocaml:01 bug:01 inactive:98 continuously:98 doligez:01 doligez:01 garbage:01 beginners:01 wrote:01 Well if I don't set the overhead to 0, there is still a slight " innactive memory" accumulation. However, when the memory goes back to a reasonable level, I set the overhead back to 80 (which is the default value) using another alarm. The result of this is that inactive memory wobbles continuously during the execution (it accumulates at overhead 80 and decreases at overhead 0). J On Tue, Jul 29, 2008 at 9:57 AM, Damien Doligez wrote: > 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 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >