Profile Image
vishnupriya

What is JVM startup parameter: -XX:+ParallelRefProcEnabled?

What is JVM startup parameter: -XX:+ParallelRefProcEnabled? Have you used this JVM arguement before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvmargument

  • xx-parallelrefprocenabled

  • x-parallelrefprocenabled

  • JVM startup parameter

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:                                                    

 

The option “-XX:+ParallelRefProcEnabled” enable parallel reference processing whenever possible.

 

Since:

 

Starting from JDK 6.

 

Syntax:

 

java -XX:+ParallelRefProcEnabled MainClass

 

Examples:

 

To turn on the detailed logs for Garbage Collector: java -XX:+ParallelRefProcEnabled MainClass

 

Description:

 

Information about the time used for processing of reference objects from the package “java.lang.Ref” is displayed in the Ref Proc and Ref Enq phases.

 

Ref Proc is a phase which starts after the main Garbage Collector (GC) phase. It knows which objects have survived the GC phase and which are not, so it can update the referents of Reference Objects according to the requirements of their particular type.

 

Ref Enq is a phase which starts after the Ref Proc phase, its main purpose is to place references into their respective reference queues (a reference queue is an Object on heap, it’s used usually to implement patterns enabled by special references).

 

These two phases might take a long time, that’s why JVM introduced the flag “” which enable parallelization of those two phases. It determines whether processing of “java.lang.Ref.*” instances should be done in parallel by multiple threads.

 

Default Value:

 

This option is disabled by default.

 

Errors:

 

None.

 

Related Posts:

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvmargument

  • xx-parallelrefprocenabled

  • x-parallelrefprocenabled

  • JVM startup parameter