[GHC] #9872: Runing type functions is too slow

GHC ghc-devs at haskell.org
Mon Dec 22 12:05:50 UTC 2014


#9872: Runing type functions is too slow
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |            Owner:
                  Type:  bug         |           Status:  closed
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
            Resolution:  fixed       |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by jstolarek):

 I've been chasing memory leak on my injective type families branch and it
 seems that these tests are the culprit. When run separately they are
 harmless and finish in a matter of seconds. However each of them allocates
 a lot of memory:

 T9872a:
 {{{
 2,680,443,384 bytes allocated in the heap
 1,341,144,448 bytes copied during GC
   230,497,136 bytes maximum residency (10 sample(s))
     1,651,136 bytes maximum slop
           465 MB total memory in use (0 MB lost due to fragmentation)

 Productivity  34.5% of total user, 34.5% of total elapsed
 }}}
 T9872b:
 {{{
 3,480,475,896 bytes allocated in the heap
 2,049,027,512 bytes copied during GC
   466,737,240 bytes maximum residency (12 sample(s))
     2,234,096 bytes maximum slop
           912 MB total memory in use (0 MB lost due to fragmentation)

 Productivity  33.2% of total user, 33.1% of total elapsed
 }}}
 T9872c:
 {{{
 2,963,257,224 bytes allocated in the heap
 1,905,496,768 bytes copied during GC
   454,512,352 bytes maximum residency (11 sample(s))
     2,104,512 bytes maximum slop
           889 MB total memory in use (0 MB lost due to fragmentation)

 Productivity  31.2% of total user, 31.2% of total elapsed
 }}}
 T9872d:
 {{{
 740,175,432 bytes allocated in the heap
 564,712,136 bytes copied during GC
  68,077,728 bytes maximum residency (11 sample(s))
     904,080 bytes maximum slop
         174 MB total memory in use (0 MB lost due to fragmentation)

 Productivity  26.1% of total user, 26.3% of total elapsed
 }}}
 So when these tests are run concurrently during validation they eat up
 ~2,5GB of RAM and that, in conjunction with other things running in the
 background, is too much for my machine. Note also the productivity:
 between to 2/3rd and 3/4th of running time is spent on garbage collection.
 These numbers don't look good.

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


More information about the ghc-tickets mailing list