Is CMS cycle can collect finalize objects

Bharath Mundlapudi bharathwork at yahoo.com
Fri Apr 15 07:12:46 PDT 2011


We have tuned our server to not run into Full GC with CMS collector. One thing, we noted recently was - java.lang.ref.Finalizer objects getting incremented with load. Due to this, CMS cycle threshold was reached and CMS went into loop and run continuously.

To verify if CMS is cleaning up these Finalizer objects, I have tested on another setup. I have noticed that Finalizer objects are not getting cleaned but when i force full gc, these objects are getting garbage collected. 


I have the following questions:
1. Is there a way (JVM cmd option) to tell CMS to cleanup Finalizer objects when CMS runs rather than via Full GC?
2. I see that, we can there is System.runFinalization() method to notify GC to cleanup the finalizer queue. Is this better approach for server-side applications?
3. Is there any JMX API to invoke finalization from an external process?


Versions verified:

We are using JDK 1.6.0 update 21/23 on Redhat 5.4. 


Thanks in anticipation,
Bharath
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20110415/92d2f600/attachment.html 


More information about the hotspot-gc-use mailing list