Question

Our JVM is HotSpot -64-Bit Server (mixed mode) on Linux.

Looking at the GC logs it seems that ParallelGC is the default. Why isn't CMS the default GC algo? Is it due to the lack of compaction? But that would be the case with parallelGC too.

We notice that a FullGC is not fired even when the heap reaches 75% capacity. When does a full GC fired for the default GC in java 1.7?

Était-ce utile?

La solution

Looking at the GC logs it seems that ParallelGC is the default.

It has been since it was added.

Why isn't CMS the default GC algo?

ParallelGC is the fastest for throughput, lowest CPU usage and the easiest to use.

Is it due to the lack of compaction?

That is one issue.

But that would be the case with parallelGC too.

Not such an issue for this GC as it defragments.

We notice that a FullGC is not fired even when the heap reaches 75% capacity. When does a full GC fired for the default GC in java 1.7?

When the JVM cannot allocate memory, even if you have CMS enabled. (Or when System.gc() triggers it to do a full collection) CMS only fires a major collection of the tenured space when it runs. There is no CMS for FullGC.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top