Parallel/Throughput collector

The Parallel collector is the JVM's default collector and is also known as the Throughput collector. As the name suggests, this collector, unlike the Serial collector, uses multithread to manage the heap memory. The Parallel garbage collector still freezes all the application threads when performing either minor or full GC. If we want to use the Parallel garbage collector, we should specify the tuning parameters, such as threads, pause time, throughput, and footprints.

The following are the arguments to specify the tuning parameters:

  • Threads: -XX:ParallelGCThreads=<N>
  • Pause time: -XX:MaxGCPauseMillis=<N>
  • Throughput: -XX:GCTimeRatio=<N>
  • Footprint (maximum heap size): -Xmx<N>

To enable the Parallel garbage collector in our application, set the -XX:+UseParallelGC option.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset