They are algorithms for the young generation garbage collection.
The second one (UseParNewGC) gets activated automatically with the concurrent tenured generation garbage collection (see Java Concurrent and Parallel GC) but, is there a difference between the two parallel algorithms?
This question is related to
java
jvm-arguments
Using -XX:+UseParNewGC along with -XX:+UseConcMarkSweepGC, will cause higher pause time for Minor GCs, when compared to -XX:+UseParallelGC.
This is because, promotion of objects from Young to Old Generation will require running a Best-Fit algorithm (due to old generation fragmentation) to find an address for this object.
Running such an algorithm is not required when using -XX:+UseParallelGC, as +UseParallelGC can be configured only with MarkandCompact Collector, in which case there is no fragmentation.
UseParNewGC A parallel version of the young generation copying collector is used with the concurrent collector (i.e. if -XX:+ UseConcMarkSweepGC is used on the command line then the flag UseParNewGC is also set to true if it is not otherwise explicitly set on the command line).
Perhaps the easiest way to understand was combinations of garbage collection algorithms made by Alexey Ragozin
<table border="1" style="width:100%">_x000D_
<tr>_x000D_
<td align="center">Young collector</td>_x000D_
<td align="center">Old collector</td>_x000D_
<td align="center">JVM option</td>_x000D_
</tr>_x000D_
<tr>_x000D_
<td>Serial (DefNew)</td>_x000D_
<td>Serial Mark-Sweep-Compact</td>_x000D_
<td>-XX:+UseSerialGC</td>_x000D_
</tr>_x000D_
<tr>_x000D_
<td>Parallel scavenge (PSYoungGen)</td>_x000D_
<td>Serial Mark-Sweep-Compact (PSOldGen)</td>_x000D_
<td>-XX:+UseParallelGC</td>_x000D_
</tr>_x000D_
<tr>_x000D_
<td>Parallel scavenge (PSYoungGen)</td>_x000D_
<td>Parallel Mark-Sweep-Compact (ParOldGen)</td>_x000D_
<td>-XX:+UseParallelOldGC</td>_x000D_
</tr>_x000D_
<tr>_x000D_
<td>Serial (DefNew)</td>_x000D_
<td>Concurrent Mark Sweep</td>_x000D_
<td>_x000D_
<p>-XX:+UseConcMarkSweepGC</p>_x000D_
<p>-XX:-UseParNewGC</p>_x000D_
</td>_x000D_
</tr>_x000D_
<tr>_x000D_
<td>Parallel (ParNew)</td>_x000D_
<td>Concurrent Mark Sweep</td>_x000D_
<td>_x000D_
<p>-XX:+UseConcMarkSweepGC</p>_x000D_
<p>-XX:+UseParNewGC</p>_x000D_
</td>_x000D_
</tr>_x000D_
<tr>_x000D_
<td colspan="2">G1</td>_x000D_
<td>-XX:+UseG1GC</td>_x000D_
</tr>_x000D_
</table>
_x000D_
Conclusion:
UseParNewGC usually knowns as "parallel young generation collector" is same in all ways as the parallel garbage collector (-XX:+UseParallelGC), except that its more sophiscated and effiecient. Also it can be used with a "concurrent low pause collector".
See Java GC FAQ, question 22 for more information.
Note that there are some known bugs with UseParNewGC
Source: Stackoverflow.com