JDK-7068229 : G1: Dynamically enable MT reference processing for remark pauses
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7u2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2011-07-18
  • Updated: 2018-06-13
  • Resolved: 2018-06-13
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
During performance runs of SPECjEnterprise, a few extremely long remark pasues were observed ( > 5s). These long pauses caused the app server under test to prematurely end sessions/close connections resulting in a significant reduction of injection rate.

After analysis of the GC log and code it was that the reason for these long remark pauses might be the reference processing that takes place during a remark. By default the reference processing that takes place during a remark pause is single threaded (executed by the VMThread). Parallel reference processing is turned on by setting the ParallelRefProcEnabled flag to true and the number of ParallelGCThreads > 1.

Enabling parallel reference processing does incur an overhead - which we don't want to incur. Thererefore we want to be able to make the enabling of parallel reference processing dynamic, independent of the ParallelRefProcEnabled flag, and based upon the work that the reference processor has to do.

Comments
One problem that disallows simply enabling parallel reference processing is the large number of setups/teardowns of reference processing. In total, if ParallelRefProcEnabled is enabled, we start and stop worker threads for nine times in total. (Twice each for processing the different types of soft references, and once for enqueuing). This most of the time takes more time than actual processing.
27-03-2014