• Post Reply Bookmark Topic Watch Topic
  • New Topic

G1 Garbage Collector - Parallel Compacting traces  RSS feed

 
ckt bowel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As per specification of G1 Garbage Collector (http://www.oracle.com/technetwork/java/javase/tech/g1-intro-jsp-135488.html ), it is a Incremental Parallel Compacting Collector.

I would like to know is there a way (from traces or by using any tool) above compacting activities are happened.

I'm using following java options for my application:

"-Xms8192m -Xmx8192m -XX:+UseG1GC -XX:+AggressiveOpts -XX:+HeapDumpOnOutOfMemoryError -XX:+OptimizeStringConcat -XX:+UseFastAccessorMethods -XX:+UseStringCache -XX:-UseSplitVerifier -XX:MaxGCPauseMillis=50 -Dsun.rmi.dgc.client.gcInterval=9223372036854775807 -Dsun.rmi.dgc.server.gcInterval=9223372036854775807"

Thanks in advance,
 
Tim Cooke
Marshal
Posts: 4047
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use Visual VM to monitor your garbage.
 
ckt bowel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim. Could you please point out exactly what needs to look for in VisualVM GUI ? Also, I have the logs collected and is there a way to confirm compacting happened ?

Thanks in advance.
 
Tim Cooke
Marshal
Posts: 4047
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my experience it's not an exact science but it will show you how the GC views your objects and will allow you to see if you're getting lots of "stop the world" events going on. Best thing to do is to fire it up and have a play with it, see what you see.

If you have any particular queries about what you're seeing in the tool then I'll try my best to explain what you're seeing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!