From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id AFAB2BC32 for ; Mon, 14 Mar 2005 00:12:17 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j2DNCHcG011048 for ; Mon, 14 Mar 2005 00:12:17 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA15149 for ; Mon, 14 Mar 2005 00:12:17 +0100 (MET) Received: from [IPv6:::1] (yquem.inria.fr [128.93.8.37]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j2DNCFPa011042 for ; Mon, 14 Mar 2005 00:12:16 +0100 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <20050312.225725.125114910.eijiro_sumii@anet.ne.jp> References: <20050312.225725.125114910.eijiro_sumii@anet.ne.jp> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <1f63a9ce4272cab600c2e1f2a63c8cf3@inria.fr> Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] how to "disable" GC? Date: Mon, 14 Mar 2005 00:12:25 +0100 To: caml users X-Mailer: Apple Mail (2.619.2) X-Miltered: at nez-perce with ID 4234C8D1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4234C8CF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 eijiro:01 sumii:01 variants:01 minor:01 heap:01 runtime:01 minor:01 heap:01 arrays:01 ...:98 wrote:01 doligez:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Mar 13, 2005, at 04:57, Eijiro Sumii wrote: > setenv OCAMLRUNPARAM 's=1000000000,v=0x1ff' > > and its variants, but none of them seem to stop GC from happening - > and once it happens, it's MUCH slower of course! By the way, the > machine has 8GB main memory. > > So, my questions are: > > 1. How does the GC happen at all when the minor heap is so huge? The > programs don't seem to use so much memory anyway... Look for "caml_check_urgent_gc" in the runtime sources and you'll see that minor collections can be triggered even if the minor heap is not full if needed, in order to do a slice of major GC. So if you allocate some things that go directly into the major heap (for example reasonably large arrays or strings) you need a big major heap as well as a big minor heap: setenv OCAMLRUNPARAM 's=500M,h=500M,v=0x1ff' -- Damien