#3110: Setting the hard maximum heap size no longer works
------------------------------+---------------------------------------------
 Reporter:  dons              |          Owner:                  
     Type:  bug               |         Status:  closed          
 Priority:  normal            |      Milestone:                  
Component:  Runtime System    |        Version:  6.10.1          
 Severity:  normal            |     Resolution:  invalid         
 Keywords:                    |       Testcase:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
------------------------------+---------------------------------------------
Changes (by dons):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 Looks like this might be the GC bug that's already fixed.

 Another example:

 {{{
 main = do print (product s)
           print (sum s)

   where s = [1..]
 }}}

 With GHC 6.10.1

 {{{
 -bash-3.2$ ./A1 +RTS -sstderr -M4M
 ./A1 +RTS -sstderr -M4M
       16,307,808 bytes allocated in the heap
        3,982,800 bytes copied during GC
        3,061,660 bytes maximum residency (3 sample(s))
          214,100 bytes maximum slop
             2932 MB total memory in use (1204 MB lost due to
 fragmentation)

   Generation 0:    29 collections,     0 parallel,  0.02s,  0.03s elapsed
   Generation 1:     3 collections,     0 parallel,  0.02s,  3.06s elapsed

   INIT  time    0.00s  (  0.00s elapsed)
   MUT   time   10.27s  ( 21.53s elapsed)
   GC    time    0.04s  (  3.09s elapsed)
   EXIT  time    0.00s  (  0.00s elapsed)
   Total time   10.31s  ( 24.62s elapsed)

   %GC time       0.4%  (12.5% elapsed)

   Alloc rate    1,587,907 bytes per MUT second

   Productivity  99.6% of total user, 41.7% of total elapsed
 }}}

 It uses too much heap.

 With 6.10.2 it is fixed:

 {{{
 -bash-3.2$ ./A1 +RTS -sstderr -M4M
 ./A1 +RTS -sstderr -M4M
 Heap exhausted;
 Current maximum heap size is 3997696 bytes (3 MB);
 use `+RTS -M<size>' to increase it.
   28,835,361,100 bytes allocated in the heap
        8,082,024 bytes copied during GC
        3,809,076 bytes maximum residency (5 sample(s))
          385,760 bytes maximum slop
               17 MB total memory in use (11 MB lost due to fragmentation)

   Generation 0: 46743 collections,     0 parallel,  0.21s,  0.26s elapsed
   Generation 1:     5 collections,     0 parallel,  0.03s,  0.04s elapsed

   INIT  time    0.00s  (  0.00s elapsed)
   MUT   time   14.01s  ( 14.10s elapsed)
   GC    time    0.24s  (  0.31s elapsed)
   EXIT  time    0.00s  (  0.00s elapsed)
   Total time   14.25s  ( 14.41s elapsed)

   %GC time       1.7%  (2.1% elapsed)

   Alloc rate    2,058,198,508 bytes per MUT second

   Productivity  98.3% of total user, 97.2% of total elapsed
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3110#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to