The Garbage Collector Ate My Homework

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 time 0.00s ( 0.00s elapsed) MUT time 233.66s (776.99s elapsed) GC time 4045.89s (4251.52s elapsed) EXIT time 0.00s ( 0.00s elapsed) Total time 4279.55s (5028.52s elapsed) %GC time 94.5% (84.5% elapsed) Alloc rate 506,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! T. -- Dr Thomas Conway drtomc@gmail.com Silence is the perfectest herald of joy: I were but little happy, if I could say how much.

On 7/3/07, Thomas Conway
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 time 0.00s ( 0.00s elapsed) MUT time 233.66s (776.99s elapsed) GC time 4045.89s (4251.52s elapsed) EXIT time 0.00s ( 0.00s elapsed) Total time 4279.55s (5028.52s elapsed)
%GC time 94.5% (84.5% elapsed)
Alloc rate 506,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

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 time 0.00s ( 0.00s elapsed) MUT time 233.66s (776.99s elapsed) GC time 4045.89s (4251.52s elapsed) EXIT time 0.00s ( 0.00s elapsed) Total time 4279.55s (5028.52s elapsed)
%GC time 94.5% (84.5% elapsed)
Alloc rate 506,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
participants (3)
-
Stefan O'Rear
-
Thomas Conway
-
Tim Chevalier