java GC algorithm fine tuning : CMS algorithm alone & combination

Currently I am using a combination of CMS and ParNewGC

-XX:+UseConcMarkSweepGC -XX:+UseParNewGC

As per my understanding, CMS is used for Old Gen GC and UserPareNewGC used for you gen garbage collection.

If I pass only CMS as single parameter, -XX:+UseConcMarkSweepGC, is CMS used for garbage collection of both young gen and Old Gen?

I think that UseParNewGC still used for young gen even though it has not been configured along with CMS. But I want to confirm the assumption.

Am I right?

EDIT: I am using JDK 1.7 version. If behaviour is different in 1.7 and 1.8, please explain.

Answers


When asking gc questions you should state what version of the jdk you are wondering about since the actual combination varies from version to version. But, CMS is only used with tenured generation, never with young generation. Parallell New Gen scavenge will be used.


I think that UseParNewGC still used for young gen even though it has not been configured along with CMS. But I want to confirm the assumption.

You can always determine the effective flags by appending -XX:+PrintFlagsFinal to the command line.

This will allow you to determine whether changing flag A will influence flag B.


Need Your Help

Jquery + Chrome memory issue

jquery memory google-chrome

I'm running this script in Google Chrome while using the Chrome Task Manager to monitor memory usage:

Using a saved file directory

java swing jfilechooser

After getting a complete file directory structure from the file chooser, I would like to save the path in a JButton automatically, without manually feeding it (copying/pasting). How do I go about d...