Re: [Haskell-cafe] The Garbage Collector Ate My Homework
Hmm, looks like the garbage collector got hungry again: 1093,741,664,672 bytes allocated in the heap 1006,759,632,160 bytes copied during GC (scavenged) 72,181,353,728 bytes copied during GC (not scavenged) 400,940,412 bytes maximum residency (8853 sample(s)) 76353 collections in generation 0 (3724.54s) 8853 collections in generation 1 (19689.00s) 1065 Mb total memory in use INIT time0.00s ( 0.00s elapsed) MUT time 2619.54s (3103.46s elapsed) GCtime 23413.54s (23569.24s elapsed) RPtime0.00s ( 0.00s elapsed) PROF time 2167.91s (2204.09s elapsed) EXIT time0.00s ( 0.08s elapsed) Total time 28201.00s (28876.80s elapsed) %GC time 83.0% (81.6% elapsed) Alloc rate417,531,666 bytes per MUT second Productivity 9.3% of total user, 9.1% of total elapsed And that was with -H700M. What a shame the heap profiler (-hb) aborts on my program. :-( Still, -hc and -hd seem to work, the only hassle is the hours of running time required to get things to go bad. cheers, T. -- Dr Thomas Conway [EMAIL PROTECTED] Silence is the perfectest herald of joy: I were but little happy, if I could say how much. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Garbage Collector Ate My Homework
On Wed, Jul 04, 2007 at 03:56:20PM +1000, Thomas Conway wrote: Well, not quite, but look at the following: 118,342,689,824 bytes allocated in the heap 144,831,738,780 bytes copied during GC (scavenged) 335,086,064 bytes copied during GC (not scavenged) 255,257,516 bytes maximum residency (42 sample(s)) 222884 collections in generation 0 (3891.90s) 42 collections in generation 1 (153.99s) 536 Mb total memory in use INIT time0.00s ( 0.00s elapsed) MUT time 233.66s (776.99s elapsed) GCtime 4045.89s (4251.52s elapsed) EXIT time0.00s ( 0.00s elapsed) Total time 4279.55s (5028.52s elapsed) %GC time 94.5% (84.5% elapsed) Alloc rate506,470,897 bytes per MUT second Productivity 5.5% of total user, 4.6% of total elapsed Can anyone offer general suggestions for how to fix this! The fact that so many collections occured in the nursery suggests that you are creating a huge amount of temporary objects and immediately throwing them away. This is expected if the strictness analyser is disabled by not enabling optimizations. Passing -funbox-strict-fields may help. Otherwise, as Tim says, your best bet is to post a profile. Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Garbage Collector Ate My Homework
[I assume this was meant to go to the list as well, so I'm adding it back to the CCs] On 7/3/07, Thomas Conway [EMAIL PROTECTED] wrote: It occurs to me that tweaking the GC parameters can probably make a big difference: is starting with a bigger heap likely to help, or more generations? My generation hypothesis is that more generations will encourage the cached data to drop down out of generation 0, reducing the GC load. Starting with a bigger heap is likely to help, since it means that GCs will be needed less often. I'm not sure I buy your generation hypothesis, because even with two generations, you would expect to see some of the cached data move to generation 1. Lots of data in generation 0 implies your code continues to allocate many objects as it goes on running. On the other hand, you could still try and see if it helps. Cheers, Tim -- Tim Chevalier* catamorphism.org *Often in error, never in doubt The illegal we do immediately. The unconstitutional takes a little longer. -- Henry Kissinger ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Garbage Collector Ate My Homework
On 7/3/07, Thomas Conway [EMAIL PROTECTED] wrote: Okay, so a bit of a tweak of the RTS flags, I got a DRAMATIC improvement: 239,434,077,460 bytes allocated in the heap 9,034,063,712 bytes copied during GC (scavenged) 132,748,740 bytes copied during GC (not scavenged) 226,313,736 bytes maximum residency (7 sample(s)) 5992 collections in generation 0 (136.16s) 38 collections in generation 1 ( 62.69s) 7 collections in generation 2 ( 1.38s) 792 Mb total memory in use INIT time0.00s ( 0.00s elapsed) MUT time 417.54s (673.69s elapsed) GCtime 200.23s (205.86s elapsed) EXIT time0.00s ( 0.00s elapsed) Total time 617.78s (879.55s elapsed) %GC time 32.4% (23.4% elapsed) Alloc rate573,432,968 bytes per MUT second Productivity 67.6% of total user, 47.5% of total elapsed The flags I used were: -H500M -G3 Nice -- but did you compare the results if you just add -H500M and not -G3? Cheers, Tim -- Tim Chevalier* catamorphism.org *Often in error, never in doubt Aw, honey, you can keep what's in my pockets, but send me back my pants. --Greg Brown ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The Garbage Collector Ate My Homework
On 7/3/07, Thomas Conway [EMAIL PROTECTED] wrote: Well, not quite, but look at the following: 118,342,689,824 bytes allocated in the heap 144,831,738,780 bytes copied during GC (scavenged) 335,086,064 bytes copied during GC (not scavenged) 255,257,516 bytes maximum residency (42 sample(s)) 222884 collections in generation 0 (3891.90s) 42 collections in generation 1 (153.99s) 536 Mb total memory in use INIT time0.00s ( 0.00s elapsed) MUT time 233.66s (776.99s elapsed) GCtime 4045.89s (4251.52s elapsed) EXIT time0.00s ( 0.00s elapsed) Total time 4279.55s (5028.52s elapsed) %GC time 94.5% (84.5% elapsed) Alloc rate506,470,897 bytes per MUT second Productivity 5.5% of total user, 4.6% of total elapsed Can anyone offer general suggestions for how to fix this! Are you compiling with -O2? Besides that, there's not too much we can say without either seeing your code, or the results of profiling when you compile with -prof -auto-all, or both. Cheers, Tim -- Tim Chevalier* catamorphism.org *Often in error, never in doubt There are no difficult problems, just unfortunate notations. -- Alfonso Gracia-Saz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe