JDK-6486089 : CMS: CMSInitiatingOccupancyFraction does not take effect
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 5.0u9
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux_suse_sles_9
  • CPU: x86
  • Submitted: 2006-10-25
  • Updated: 2010-12-02
  • Resolved: 2010-12-02
Related Reports
Relates :  
Using -XX:CMSInitiatingOccupancyFraction=90 (for example) together with -XX:+UseConcMarkSweepGC in many cases has no effect with Java 5.0_09 and earlier. Contrary to this, with Mustang this setting leads to less frequent CMS runs and better memory usage.

EVALUATION CF the above comment, rather than overload this CR filing with what is essentially a performance RFE for CMS, i'd rather we filed that as a separate CR/RFE when we get to do that work. Since the original issue has been resolved at the customer, this CR is being closed as "Not a Defect".

EVALUATION The main issue faced by customer appears to have been satisfactorily resolved and explained. The only remaining issue to my mind is fixing the apparent badness in CMS triggering in 6.0 which causes CMS cycles to happoen a bit too late. I suspect the real solution is using a smarter filter to make the decision. This will be done soon. Meanwhile I am lowering the priority for process reasons and retargeting the CR to 7.0 the current development release, with the understanding that any improvements that are worth backporting will be considered for 6uX and older trains.

EVALUATION Andreas did confirm that +UseCMSInitiatingOccupancyOnly does fix the issue in 5.0 in the case of the customer. He was however concerned as to why the ergonomically selected threshold was so low in 5.0, cf 6.0. See the comments section for some explanations related to that (which will be summarized to this space once the investigation is complete and we are ready to close out this bug).

WORK AROUND Use -XX:+UseCMSInitiatingOccupancyOnly to disable CMS's automatic cycle initiation.

EVALUATION The issue is that the automatic cycle initiation of CMS is starting the cycle below the given initiation fraction. I suggested this to Andreas and he confirmed that using the workaround of -XX:+UseCMSInitiatingOccupancyOnly resolves the issue in this synthetic benchmark. Let's see if it helps his customer.