From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id C43D8820A1 for ; Sun, 18 Aug 2013 23:14:27 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of anthony.tavener@gmail.com) identity=pra; client-ip=209.85.215.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anthony.tavener@gmail.com"; x-sender="anthony.tavener@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of anthony.tavener@gmail.com designates 209.85.215.181 as permitted sender) identity=mailfrom; client-ip=209.85.215.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anthony.tavener@gmail.com"; x-sender="anthony.tavener@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ea0-f181.google.com) identity=helo; client-ip=209.85.215.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anthony.tavener@gmail.com"; x-sender="postmaster@mail-ea0-f181.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswBAGs4EVLRVde1lGdsb2JhbABagztRrHeJcIhGgRYIFg4BAQEBBw0JCRQEJIIkAQEEAUABGxILAQMBCwYFBAcaISIBEQEFAQoSBhMSh2sBAwkGDJhSjFCDAoNIChknAwpkh3QBBQyQUAQHhBIDiS2ON4EtjkMWKYRhHQ X-IPAS-Result: AswBAGs4EVLRVde1lGdsb2JhbABagztRrHeJcIhGgRYIFg4BAQEBBw0JCRQEJIIkAQEEAUABGxILAQMBCwYFBAcaISIBEQEFAQoSBhMSh2sBAwkGDJhSjFCDAoNIChknAwpkh3QBBQyQUAQHhBIDiS2ON4EtjkMWKYRhHQ X-IronPort-AV: E=Sophos;i="4.89,908,1367964000"; d="scan'208";a="24181598" Received: from mail-ea0-f181.google.com ([209.85.215.181]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Aug 2013 23:14:27 +0200 Received: by mail-ea0-f181.google.com with SMTP id d10so1929508eaj.40 for ; Sun, 18 Aug 2013 14:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sFPTlst0A1Uj15dwcLpKyY//lJ2iR3omMza71Ce8aDI=; b=SpdUi8QHKjub3i1mXidqzaieaI1tggxV6RsyoWQPVIsOxGr03dfBLOlkYzquc3zEwP 7bm5xH+rdZnAC93RhCrH5LTKPq6YdGxQWeL21QobqVWrdXCA2UnI7tN+W/rcU4JisfnU S6zGsJPYVSd2Ex1wdm7MldNAddnuny2VFiv1a/N0DMX13URvYqHCbgLgBj4503flGzQy 2qrukESwRN+XbvqquTUUxWcRRI8xCjozklxYLnQ9HUOwaF1sRnShlVGNYk7a84cxsJQ8 9R8h/NLwivvB8CpUnEubzA+zLCGr1lc5RyEvHvVtmb17trEqGAJqlMxzAzJp2sI7efPa VdNw== MIME-Version: 1.0 X-Received: by 10.15.48.67 with SMTP id g43mr8129907eew.17.1376860466495; Sun, 18 Aug 2013 14:14:26 -0700 (PDT) Received: by 10.14.10.68 with HTTP; Sun, 18 Aug 2013 14:14:26 -0700 (PDT) In-Reply-To: <20130818205305.GA7841@siouxsie> References: <20130818204213.GA7482@siouxsie> <20130818205305.GA7841@siouxsie> Date: Sun, 18 Aug 2013 15:14:26 -0600 Message-ID: From: Anthony Tavener To: oliver Cc: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=001a11c32c0802ef2604e43f4f3d Subject: Re: [Caml-list] Early GC'ing --001a11c32c0802ef2604e43f4f3d Content-Type: text/plain; charset=ISO-8859-1 I run tight loops (game engine -- 60fps with a lot of memory activity and allocations each frame), and the GC works remarkably well at keeping things sane. I did have a problem with runaway allocations once, and tracked it down to a source of allocations which was effectively never un-referenced... so a legitimate leak. If you do a Gc.full_major (), is your memory returned? If not, then I think that's evidence that there's still some handle on it -- be sure the appropriate values have fallen out of scope and aren't referenced in some other way! On the other hand, if this is just the GC not cleaning up quick enough for your case... I'm sorry I have no help for tuning the GC. The documentation in gc.mli seemed pretty sensible when I looked at it (a while ago) though! On Sun, Aug 18, 2013 at 2:53 PM, oliver wrote: > With the subset of the files I want to read, > I get these two GC-stats-outputs (Gc.print_stats) at the beginning and > the end of the reading loop: > > > -------------------- > minor_words: 176917 > promoted_words: 28265 > major_words: 83313 > minor_collections: 5 > major_collections: 1 > heap_words: 126976 > heap_chunks: 1 > top_heap_words: 126976 > live_words: 82608 > live_blocks: 7325 > free_words: 44368 > free_blocks: 33 > largest_free: 43663 > fragments: 0 > compactions: 0 > -------------------- > minor_words: 119944974 > promoted_words: 18927217 > major_words: 55119706 > minor_collections: 3672 > major_collections: 71 > heap_words: 14221824 > heap_chunks: 112 > top_heap_words: 14221824 > live_words: 10194963 > live_blocks: 1184994 > free_words: 4024031 > free_blocks: 46685 > largest_free: 65811 > fragments: 2830 > compactions: 6 > -------------------- > > > What does this tell you? > How to clean the mem? > > > Ciao, > Oliver > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a11c32c0802ef2604e43f4f3d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I run tight loops (game engine -- 60fps with a lot of memo= ry activity and allocations each frame), and the GC works remarkably well a= t keeping things sane. I did have a problem with runaway allocations once, = and tracked it down to a source of allocations which was effectively never = un-referenced... so a legitimate leak.

If you do a Gc.full_major (), is your memory returned?= If not, then I think that's evidence that there's still some handl= e on it -- be sure the appropriate values have fallen out of scope and aren= 't referenced in some other way!

On the other hand, if this is just the GC n= ot cleaning up quick enough for your case... I'm sorry I have no help f= or tuning the GC. The documentation in gc.mli seemed pretty sensible when I= looked at it (a while ago) though!



On Sun, Aug 18, 2013 at 2:53 PM, oliver <= ;oliver@firs= t.in-berlin.de> wrote:
With the subset of the files I want to read,=
I get these two GC-stats-outputs (Gc.print_stats) at the beginning and
the end of the reading loop:


--------------------
minor_words: 176917
promoted_words: 28265
major_words: 83313
minor_collections: 5
major_collections: 1
heap_words: 126976
heap_chunks: 1
top_heap_words: 126976
live_words: 82608
live_blocks: 7325
free_words: 44368
free_blocks: 33
largest_free: 43663
fragments: 0
compactions: 0
--------------------
minor_words: 119944974
promoted_words: 18927217
major_words: 55119706
minor_collections: 3672
major_collections: 71
heap_words: 14221824
heap_chunks: 112
top_heap_words: 14221824
live_words: 10194963
live_blocks: 1184994
free_words: 4024031
free_blocks: 46685
largest_free: 65811
fragments: 2830
compactions: 6
--------------------


What does this tell you?
How to clean the mem?


Ciao,
=A0 =A0Oliver

--
Caml-list mailing list. =A0Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--001a11c32c0802ef2604e43f4f3d--