Garbage collector stopping my world for half a second

Andrew Haley aph@redhat.com
Fri Dec 2 12:09:00 GMT 2005


Boehm, Hans writes:
 > The size of the root set will be affected by the total size of libraries
 > (or pieces of static libraries) you load. If the root sizes are the
 > problem, it may not occur with a small test program, especially if it's
 > statically linked. I would try running with GC_DUMP_REGULARLY.
 > 
 > The simple test example may also have had less live data, or less
 > pointer-dense data.
 > 
 > I believe the collector is still scanning all sorts of junk (e.g.
 > exception tables on some platforms) that it shouldn't be scanning. (The
 > fact that it is scanning library data by default means that it sees Java
 > pointers stored by CNI code into globals, which is probably good. The
 > fact that it is sometimes scanning exception tables is clearly bad.)
 > 
 > Given that you're on a slow machine, I think your best bets are:
 > 
 > 1) Reduce root sizes if those are a large part of the problem.
Hans, one of the problems that I found it the the gc doesn't allow
fine-grained control over which libraries get registered as roots and
which don't. I fully intend to remove the need for auto-registration
of gc roots in libgcj (and I intend to do so soon) but if it's
possible in the meantime to scan some subset of shared libraries that
would help.
 > 2) If that's insufficient, you might try getting the incremental GC to
 > work.
I might point out for the uninitiated that the latter will be very
difficult indeed.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /