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.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id F3C57BC6B for ; Wed, 7 Nov 2007 20:12:19 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABCdMUfAXQInh2dsb2JhbACOfQIBCAop X-IronPort-AV: E=Sophos;i="4.21,386,1188770400"; d="scan'208";a="4002705" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 07 Nov 2007 20:12:19 +0100 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 lA7JCJjM009352 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 7 Nov 2007 20:12:19 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAFecMUdCm3xr/2dsb2JhbAA X-IronPort-AV: E=Sophos;i="4.21,386,1188770400"; d="scan'208";a="4163913" Received: from www.janestcapital.com (HELO smtp.janestcapital.com) ([66.155.124.107]) by mail1-smtp-roc.national.inria.fr with ESMTP; 07 Nov 2007 20:12:18 +0100 Received: from [172.25.135.136] [38.96.172.125] by janestcapital.com (SMTPD-9.10) id AE100834; Wed, 07 Nov 2007 14:12:16 -0500 Message-ID: <47320E10.1050307@janestcapital.com> Date: Wed, 07 Nov 2007 14:12:16 -0500 From: Adam Chlipala User-Agent: Thunderbird 1.5.0.8 (X11/20061107) MIME-Version: 1.0 To: Gerd Stolpmann Cc: caml-list@inria.fr Subject: Re: [Caml-list] OCaml runtime using too much memory in 64-bit Linux References: <4731F5D1.2070405@janestcapital.com> <1194459622.15728.94.camel@localhost.localdomain> In-Reply-To: <1194459622.15728.94.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IMAIL-SPAM-VALFROM: (0e10043700005b04) X-IMAIL-SPAM-VALREVDNS: (0e10043700005b04) X-Miltered: at concorde with ID 47320E13.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 runtime:01 gerd:01 stolpmann:01 ocaml:01 runtime:01 o'caml:01 960:98 1440:98 1920:98 wrote:01 heap:01 heap:01 caml-list:01 allocated:02 Gerd Stolpmann wrote: > Am Mittwoch, den 07.11.2007, 12:28 -0500 schrieb Adam Chlipala: > >> I've encountered a problem where certain OCaml programs use orders of >> magnitude more RAM when compiled/run in 64-bit Linux instead of 32-bit >> Linux. Some investigation led to the conclusion that the difference has >> to do with the size of OCaml page tables. (Here I mean the page tables >> maintained by the OCaml runtime system, not any OS stuff.) >> >> ... >> > > We are using O'Caml on 64 bit Linux, and aren't aware of such problems. > > Did you observe a debug GC message that proves it? 200 MB means that an > address space of 200M * 4K = 8E is covered. > Here's one run, cut off after allocation seems to settle down: OCAMLRUNPARAM="v=12" ./program_name.exe Growing heap to 960k bytes Growing page table to 204151332 entries Growing heap to 1440k bytes Growing heap to 1920k bytes > Also think of Linux modifications that do address randomization, i.e. > prevent that contiguous addresses are allocated. That would definitely cause trouble. Thanks for the suggestion; I'll look into it.