aspose file tools*
The moose likes Performance and the fly likes UseParNewGC or UseParallelGC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "UseParNewGC or UseParallelGC" Watch "UseParNewGC or UseParallelGC" New topic
Author

UseParNewGC or UseParallelGC

Vivek Punekar
Greenhorn

Joined: Aug 25, 2009
Posts: 12
Hello,

We are using java 1.6 on Linux CentOS 64 bit for JBOSS application.

Which one is recommended UseParNewGC or UseParallelGC? What is the criteria to decide?

We have alloted 1.8GB heap on 6 GB RAM.
JVM is 32 bit.

Thanks.
Gurpreet Multani
Greenhorn

Joined: Oct 21, 2011
Posts: 1

This is taken from http://www.javaperformancetuning.com/news/qotm026.shtml:

Young generation garbage collection algorithms

The (original) copying collector (Enabled by default). When this collector kicks in, all application threads are stopped, and the copying collection proceeds using one thread (which means only one CPU even if on a multi-CPU machine). This is known as a stop-the-world collection, because basically the JVM pauses everything else until the collection is completed.

The parallel copying collector (Enabled using -XX:+UseParNewGC). Like the original copying collector, this is a stop-the-world collector. However this collector parallelizes the copying collection over multiple threads, which is more efficient than the original single-thread copying collector for multi-CPU machines (though not for single-CPU machines). This algorithm potentially speeds up young generation collection by a factor equal to the number of CPUs available, when compared to the original singly-threaded copying collector.

The parallel scavenge collector (Enabled using -XX:UseParallelGC). This is like the previous parallel copying collector, but the algorithm is tuned for gigabyte heaps (over 10GB) on multi-CPU machines. This collection algorithm is designed to maximize throughput while minimizing pauses. It has an optional adaptive tuning policy which will automatically resize heap spaces. If you use this collector, you can only use the the original mark-sweep collector in the old generation (i.e. the newer old generation concurrent collector cannot work with this young generation collector).


So in your case, because you have 1.8GB heap, you would probably be better off using -XX:+UseParNewGC.


This is strictly my opinion; Use it at your own risk.
Rojan punn
Greenhorn

Joined: Nov 29, 2011
Posts: 17

Hi,

I use -XX:+UseParNewGC
-XX:+DisableExplicitGC

It is performing quite well
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UseParNewGC or UseParallelGC
 
Similar Threads
GC taking lots of time
GC: Major Collections Taking Long Time
java.lang.OutOfMemoryError
Java Command Line Options
Too big memory size assigned for JBoss?