Out of memory mystery

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Out of memory mystery

Lennart Augustsson
I'm running the 32-bit Windows version of ghc-7.8.3.

Here are two runs:

$ RunMu +RTS -A64M -h -Sstat.log -i1 -RTS -c Strat.App.Abacus.Main
Compiling afresh Strat.App.Abacus.Main
Compiled  afresh Strat.App.Abacus.Main, 1302.84s

$ RunMu +RTS -A64M -Sstat.log -i1 -RTS -c Strat.App.Abacus.Main
Compiling afresh Strat.App.Abacus.Main
RunMu.exe: out of memory

The binary is compiled without profiling, but in the first run I'm using
the -h flag to get the rudimentary heap profile.  And with -h it works, but
without the flag it runs out of memory.

Any bright ideas from the RTS experts on why this could happen?

  -- Lennart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141207/6b16dabf/attachment.html>

Reply | Threaded
Open this post in threaded view
|

Out of memory mystery

Ben Gamari
Lennart Augustsson <lennart at augustsson.net> writes:

> I'm running the 32-bit Windows version of ghc-7.8.3.
>
> Here are two runs:
>
> $ RunMu +RTS -A64M -h -Sstat.log -i1 -RTS -c Strat.App.Abacus.Main
> Compiling afresh Strat.App.Abacus.Main
> Compiled  afresh Strat.App.Abacus.Main, 1302.84s
>
> $ RunMu +RTS -A64M -Sstat.log -i1 -RTS -c Strat.App.Abacus.Main
> Compiling afresh Strat.App.Abacus.Main
> RunMu.exe: out of memory
>
> The binary is compiled without profiling, but in the first run I'm using
> the -h flag to get the rudimentary heap profile.  And with -h it works, but
> without the flag it runs out of memory.
>
How does the produced profile look? How much memory do you expect this
process to require? Can you get a backtrace of the crash? If you're
lucky it will crash in RTS code, in which case the backtrace may be
informative.

Cheers,

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141208/4240b4cb/attachment.sig>

Reply | Threaded
Open this post in threaded view
|

Out of memory mystery

Simon Marlow-7
In reply to this post by Lennart Augustsson
There are a couple of reasons this could happen:

- The -h flag causes the GC to run more often, which will reclaim memory
more promptly

- -h causes more old-gen GCs to happen, which can avoid some cases where
generational GC has promoted something that hangs on to a lot of stuff
causing the heap to grow.

Cheers,
Simon

On 06/12/2014 23:58, Lennart Augustsson wrote:

> I'm running the 32-bit Windows version of ghc-7.8.3.
>
> Here are two runs:
>
> $ RunMu +RTS -A64M -h -Sstat.log -i1 -RTS -c Strat.App.Abacus.Main
> Compiling afresh Strat.App.Abacus.Main
> Compiled  afresh Strat.App.Abacus.Main, 1302.84s
>
> $ RunMu +RTS -A64M -Sstat.log -i1 -RTS -c Strat.App.Abacus.Main
> Compiling afresh Strat.App.Abacus.Main
> RunMu.exe: out of memory
>
> The binary is compiled without profiling, but in the first run I'm using
> the -h flag to get the rudimentary heap profile.  And with -h it works,
> but without the flag it runs out of memory.
>
> Any bright ideas from the RTS experts on why this could happen?
>
>    -- Lennart
>
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>