What is the difference between -XX:+UseParallelGC and -XX:-UseParallelGC? Most links indicate the first, but http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html mentions the second.
Thank you.
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.
Some surviving objects are aged and eventually move to the old generation. Stop the World Event - All minor garbage collections are "Stop the World" events. This means that all application threads are stopped until the operation completes. Minor garbage collections are always Stop the World events.
Key Command Line Switches. -XX:+UseG1GC - Tells the JVM to use the G1 Garbage collector. -XX:MaxGCPauseMillis=200 - Sets a target for the maximum GC pause time. This is a soft goal, and the JVM will make its best effort to achieve it. Therefore, the pause time goal will sometimes not be met.
After space-reclamation, the collection cycle restarts with another young-only phase. As backup, if the application runs out of memory while gathering liveness information, G1 performs an in-place stop-the-world full heap compaction (Full GC) like other collectors.
From the documentation:
Boolean options are turned on with
-XX:+<option>
and turned off with-XX:-<option>
So it means that -XX:+UseParallelGC
will turn on the parallel garbage collection, and -XX:-UseParallelGC
will turn it off.
The line:
-XX:+UseParallelGC
Enables the ParallelGC. Note the +
sign
The line:
-XX:-UseParallelGC
Disables it. Note the -
sign.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With