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=1.1 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 699A7BB84 for ; Mon, 12 Jan 2009 10:14:13 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAKiYaklSkiEx/2dsb2JhbADSFYVv X-IronPort-AV: E=Sophos;i="4.37,252,1231110000"; d="scan'208";a="19458661" Received: from 5070.info ([82.146.33.49]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Jan 2009 10:14:13 +0100 X-Bogosity: Unsure, tests=bogofilter Received: from [82.146.37.6] (john.ispsystem.net [82.146.37.6]) (authenticated bits=0) by 5070.info (8.14.3/8.14.0) with ESMTP id n0C9E2RF074781 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Jan 2009 09:14:06 GMT (envelope-from john@ispsystem.com) Subject: Re: [Caml-list] memory usage From: John Lepikhin To: Richard Jones Cc: caml-list@yquem.inria.fr In-Reply-To: <20090112083913.GA28059@annexia.org> References: <1231746106.4376.27.camel@john-laptop> <20090112083913.GA28059@annexia.org> Content-Type: text/plain Date: Mon, 12 Jan 2009 17:14:01 +0800 Message-Id: <1231751641.4376.39.camel@john-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (5070.info [82.146.33.49]); Mon, 12 Jan 2009 09:14:06 +0000 (UTC) X-Spam: no; 0.00; eprintf:01 byte:01 chunks:01 garbage:01 caml-list:01 let:03 let:03 reachable:05 stat:07 stat:07 john:08 john:08 memory:09 compact:09 collector:12 > Starting point should be to call this periodically: > > Gc.compact (); > let stat = Gc.stat () in > let live_words = stat.Gc.live_words in > eprintf "live words %d\n%!" live_words; > > which will tell you how many words (ie 4 or 8 byte chunks) are > reachable according to the garbage collector. Richard, here is result (statistics was saved every 10 seconds): live words - RSS: 186980 - 12380KB <-- after first 10 seconds of work 154156 - 18232KB 153923 - 19648KB ... after 10 minutes of work: 203842 - 33436KB 170559 - 33528KB 187018 - 33664KB 71626 - 33592KB Sometimes live words drops down to 40.000. But RSS always stay near 30-50MB.