[GHC] #14378: Unreasonably high memory use when compiling with profiling and -O2/-O2

GHC ghc-devs at haskell.org
Sat Oct 21 18:50:52 UTC 2017


#14378: Unreasonably high memory use when compiling with profiling and -O2/-O2
-------------------------------------+-------------------------------------
        Reporter:  AndreasK          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by AndreasK:

Old description:

> Based on [https://github.com/Daniel-Diaz/matrix/issues/43] I tried that
> myself.
>
> * Without profiling: <10 sec, <110M Residency
> * Profiling and -O: 90sec, 1.5GB Residency
> * Profiling and -O2: Killed it after 4 Minutes and it started swapping on
> a 16GB Ram machine.
>
> The invocation was: ghc Matrix.hs -prof -fprof-auto  -c -fforce-recomp -O
> -v -fprof-auto-exported -caf-all -auto-all -fstatic-argument-
> transformation
>
> Numbers above from 8.0.2.
>
> 8.2.1 improved to slightly worse than -O1 with ~95 sec and ~2.5GB ram
> usage. Still seems like a bug though.
>
> I haven't tried HEAD yet.

New description:

 Based on [https://github.com/Daniel-Diaz/matrix/issues/43] I tried that
 myself.

 * Without profiling: <10 sec, <110M Residency
 * Profiling and -O: 90sec, 1.5GB Residency
 * Profiling and -O2: Killed it after 4 Minutes and it started swapping on
 a 16GB Ram machine.

 The invocation was: ghc Matrix.hs -prof -fprof-auto  -c -fforce-recomp -O
 -v -fprof-auto-exported -caf-all -auto-all -fstatic-argument-
 transformation

 Numbers above from 8.0.2.

 Edit: I messed up the meassurement somehow.
 8.2.1 improved to -O1 with ~70 sec and shy of 1GB ram usage. Not sure if
 that would still be considered a bug.

--

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14378#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list