GC/Heap usage
Boehm, Hans
hans.boehm@hp.com
Mon Nov 8 17:57:00 GMT 2004
Looking at the log, some other things stand out:
1) The collector is tracing 15 MB of roots. Somehow it's finding
15 MB of writable and accessible data segments outside
the GC heap. A lot of that seems
to be in 4K and 8K sections. There is no way for the collector
to both maintain a reasonable heap size and get reasonable
performance in light of that. By default it will tend to grow
the heap to amortize the tracing cost over more allocation.
2) Where are the "Leaked ..." messages coming from? Those
should only be generated with leak finding turned on, which really
only makes sense for C or C++ programs that attempt to explicitly
deallocate all unused memory. If that accidentally got turned on,
I'm very surprised there aren't many more such messages. (Turning that
on also has other negative effects on the GC, but I'm not sure they
should be major.)
3) The "ready-to-be-finalized" list seems to be long and getting
longer.
Hans
> -----Original Message-----
> From: java-owner@gcc.gnu.org
> [mailto:java-owner@gcc.gnu.org]On Behalf Of
> Bryce McKinlay
> Sent: Monday, November 08, 2004 9:16 AM
> To: Rutger Ovidius
> Cc: java@gcc.gnu.org
> Subject: Re: GC/Heap usage
>>> Rutger Ovidius wrote:
>> >BM> Hi Rutger,
> >
> >BM> WeakHashMap could be the source of the problem. See:
> >BM> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16997
> >
> >BM> Regards
> >
> >BM> Bryce
> >
> >Hi,
> >
> >This may be another problem (which I _really_ hope can be corrected!
> >no one likes leaks :) ), but I have a feeling that it isn't the main
> >one. I don't have 30 megs of WeakHashMaps (or entries), and yet the
> >heap grows rather quickly (unlike java) until it levels off
> at 30 megs.
> >
> >Limiting the heap to 7 megs limited the "VM Size"(in Task Manager) to
> >~15 megs, but the "Mem Usage" was still listed as 40 megs, which I
> >don't quite understand.
> >
> >
>> I don't know a lot about Windows memory management, but it
> might be that
> "Mem usage" is the total virtual address space allocated by the app
> while "VM size" represents the memory actually used (ie: the
> equivalent
> of Resident set size in linux). Cursory speculation: Perhaps
> our GC on
> Windows is a bit greedy and allocates more address space than it
> actually needs?
>> Bryce
>
More information about the Java
mailing list