Skip to main content

Monitory and tuning garbage collection in JAVA?

 It is always confusing as in which parameter to use for garbage collection. We can collect garbage collection statistics by using below option:


-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps


The above option will spit out how often garbage collection occurs and how much time is spent on garbage collection.

Comments