From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 9E58C7EC41 for ; Wed, 24 Oct 2012 12:38:17 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of edwin+ml-ocaml@etorok.net) identity=pra; client-ip=176.9.138.55; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of edwin+ml-ocaml@etorok.net designates 176.9.138.55 as permitted sender) identity=mailfrom; client-ip=176.9.138.55; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of postmaster@mail.etorok.net designates 176.9.138.55 as permitted sender) identity=helo; client-ip=176.9.138.55; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="postmaster@mail.etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlIJANDDh1CwCYo3/2dsb2JhbABEgm2+AAQEgQeBCIIeAQEFQAEBNgIPCxgJFg8JAwIBAgFFEwgCiAEDB6dChDMBBY8MBotgg0iDI4hZjR2BF48ignI X-IronPort-AV: E=Sophos;i="4.80,639,1344204000"; d="scan'208";a="160221119" Received: from mail.etorok.net ([176.9.138.55]) by mail4-smtp-sop.national.inria.fr with ESMTP; 24 Oct 2012 12:38:16 +0200 Received: from [IPv6:2a02:2f02:1022:610d:1e6f:65ff:fe23:db0d] (unknown [IPv6:2a02:2f02:1022:610d:1e6f:65ff:fe23:db0d]) by mail.etorok.net (Postfix) with ESMTPSA id DCAFD46A8 for ; Wed, 24 Oct 2012 12:38:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=etorok.net; s=MAILOUT; t=1351075095; bh=r0IJbKoTdzdJ6wPfrE457JDvJl7JGynQdaCouLMDRlY=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=HJ5RP0Z4NhBr/WTNxqf5E0JdHCYv+0sagbLCR50tXCHA5cKd4b6ZI/Dg500iK13xo VDxR3OpOhN0oPX03mYoTQTvDAQVLWjhg++RV7V+hImfTdYtH0RQx6HiwcLuFzGbjZC /Ta4ETxzBIgTlU/nK4XHnBlc+D7NDYcyPgbr2xzQ= Message-ID: <5087C517.6000000@etorok.net> Date: Wed, 24 Oct 2012 13:38:15 +0300 From: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.9) Gecko/20121014 Icedove/10.0.9 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.6 at mail X-Virus-Status: Clean Subject: Re: [Caml-list] Behaviour of an OCaml program: any possible GC improvement? On 10/24/2012 01:08 PM, David MENTRE wrote: > Hello, > > I'm using OCaml 3.11.2 on Linux (Debian Squeeze 6.0) x86_64 platform. > > I have a program that exhibits the following gprof profile. A lot of > time is spent in the GC (more than 56 %). Is there anything I can do > with respect to the GC? Otherwise, this program is a typical symbolic > manipulation program, handling trees made of Sum types and small lists > of them (1 to 3 elements). You can try tuning the Gc parameters: http://caml.inria.fr/pub/docs/old-311/libref/Gc.html Try increasing minor_heap_size, and major_heap_increment and see if there is any improvement. Also look at Gc.stat() and see how many major collections and live words you have. --Edwin