caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Leo White <lwhite@janestreet.com>
To: Kenneth Adam Miller <kennethadammiller@gmail.com>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Overflow with Spacetime
Date: Thu, 10 Aug 2017 14:12:03 +0100	[thread overview]
Message-ID: <CABkXwkoV6xggkVCFWUhwxGKg6heNvFWimekcaC2P7FJzU8Km1w@mail.gmail.com> (raw)
In-Reply-To: <CAK7rcp_dsi9T6heoU-7x6H9q0Y7d=Y0AscZRF4QDQ95vyi5paQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2164 bytes --]

> Possibly I ran into a space leak while trying to find a space leak.

7GB for a 900MB profile sounds about right unfortunately. The format of
spacetime profiles makes it difficult for the viewer to do much better than
that. I hope to get around to changing the format to fix this, but probably
won't until some time next year.

I would recommend trying to get a smaller profile. Taking snapshots less
often will help, as will running the program for a shorter time (even with
the same number of snapshots). Failing that try getting access to a machine
with more memory.

On 9 August 2017 at 08:37, Kenneth Adam Miller <kennethadammiller@gmail.com>
wrote:

> Hello all,
>
>
> I wrote a particular application, and after profiling I can see that the
> garbage collector is using 95% of the time in the application and that it
> uses up to 6 gigs of memory on a 1 megabyte input file for a run that
> totals out to be about 2 minutes. A 27 kilobyte input file takes seconds to
> run, so I know that there is some explosive leak or otherwise terrible
> issue with the space complexity here. I doubled down, and got compilation
> to run to completion using _tags to make sure that there were symbols and
> profiling turned on (thanks Ivan, Drup).
>
> Additionally, I compiled my application with spacetime and ran it to
> obtain a `spacetime-<pid>` binary, which I then attempted to get a report
> on with prof_spacetime. prof_spacetime went up to about 7.3 gigs in memory
> usage before it repeatedly would die with `Killed` or `Stack overflow` as
> the error. I'm trying to figure out what else there is I can do to make
> sure that the process runs to completion. I double checked to make sure
> that I was running the prof_spacetime command built with just a 4.04.0
> compiler to ensure that it wouldn't profile itself while trying to "Process
> series". My spacetime dump is about 900 Mb, so I understand that it would
> use some memory processing it. Possibly I ran into a space leak while
> trying to find a space leak.
>
> In the meantime, I will try and find some intermediate size input to get
> something I can work on - thought I should report this.
>
>
>

[-- Attachment #2: Type: text/html, Size: 2788 bytes --]

  reply	other threads:[~2017-08-10 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09  7:37 Kenneth Adam Miller
2017-08-10 13:12 ` Leo White [this message]
2017-08-10 13:17   ` Kenneth Adam Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABkXwkoV6xggkVCFWUhwxGKg6heNvFWimekcaC2P7FJzU8Km1w@mail.gmail.com \
    --to=lwhite@janestreet.com \
    --cc=caml-list@inria.fr \
    --cc=kennethadammiller@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).