Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
VISUALISING GARBAGE
COLLECTION USING VISUAL VM
LUIZ TESTON, WWW.FRACTA.CC
BEFORE
WE START
MANDATORY ITEMS TO REPRODUCE THE STEPS ON THE GC WORKSHOP
▸ JDK >= 1.5
▸ Visual VM + Visual GC plugin
▸ Jetty (or any othe...
DISCLAIMER
▸ The objective is to visualise different GC configurations and
how they affect the application execution and th...
RECIPES TO TRY
RUN YOUR APP
STRESS IT
VISUALISE IT
VM ARGUMENTS TO TRY
▸ -Xmx<size>[m|g]
▸ -Xms<size>[m|g]
▸ -XX:NewSize=<size>[m|g]
▸ -XX:+UseSerialGC
▸ -XX:+UseParallelOld...
SCREENSHOTS
<no args>
-Xmx2G -Xms2G
-Xmx7G -Xms7G
-Xmx1G -Xms1G -XX:NewSize=800m
-Xmx1G -Xms1G -XX:NewSize=800m -XX:+UseSerialGC
-Xmx1G -Xms1G -XX:UseParallelOldGC
-Xmx1G -Xms1G -XX:+UseConcMarkSweepGC
-Xmx1G -Xms1G -XX:+UseParallelGC -XX:+UseNUMA
-Xmx1G -Xms1G -XX:+UseG1GC
QUESTIONS? THANKS FOR YOUR TIME!
▸ http://docs.oracle.com/javase/8/docs/technotes/guides/
vm/gctuning/index.html
▸ mechani...
Upcoming SlideShare
Loading in …5
×

Visualising Gargage Collection using Visual VM

215 views

Published on

There is a recipe for stressing a server and visualising the GC graphs with different configurations. This was done as a demo during a talk given on CorkJUG on 20/jan/16.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Visualising Gargage Collection using Visual VM

  1. 1. VISUALISING GARBAGE COLLECTION USING VISUAL VM LUIZ TESTON, WWW.FRACTA.CC
  2. 2. BEFORE WE START
  3. 3. MANDATORY ITEMS TO REPRODUCE THE STEPS ON THE GC WORKSHOP ▸ JDK >= 1.5 ▸ Visual VM + Visual GC plugin ▸ Jetty (or any other Java application to measure) ▸ Apache Bench “ab” or any other stress application ▸ credentials: cam20jan16 / AJtmN5d3
  4. 4. DISCLAIMER ▸ The objective is to visualise different GC configurations and how they affect the application execution and the GC behaviour itself. ▸ The stress tools are here just to help objects being created and destroyed by the application. ▸ We are not benchmarking jetty. ▸ We are not benchmarking http. ▸ We are not benchmarking at all.
  5. 5. RECIPES TO TRY
  6. 6. RUN YOUR APP STRESS IT VISUALISE IT
  7. 7. VM ARGUMENTS TO TRY ▸ -Xmx<size>[m|g] ▸ -Xms<size>[m|g] ▸ -XX:NewSize=<size>[m|g] ▸ -XX:+UseSerialGC ▸ -XX:+UseParallelOldGC ▸ -XX:+UseConcMarkSweepGC ▸ -XX:+UseParallelGC -XX:+UseNUMA ▸ -XX:+UseG1GC
  8. 8. SCREENSHOTS
  9. 9. <no args>
  10. 10. -Xmx2G -Xms2G
  11. 11. -Xmx7G -Xms7G
  12. 12. -Xmx1G -Xms1G -XX:NewSize=800m
  13. 13. -Xmx1G -Xms1G -XX:NewSize=800m -XX:+UseSerialGC
  14. 14. -Xmx1G -Xms1G -XX:UseParallelOldGC
  15. 15. -Xmx1G -Xms1G -XX:+UseConcMarkSweepGC
  16. 16. -Xmx1G -Xms1G -XX:+UseParallelGC -XX:+UseNUMA
  17. 17. -Xmx1G -Xms1G -XX:+UseG1GC
  18. 18. QUESTIONS? THANKS FOR YOUR TIME! ▸ http://docs.oracle.com/javase/8/docs/technotes/guides/ vm/gctuning/index.html ▸ mechanical-sympathy.blogspot.com/2013/07/java- garbage-collection-distilled.html ▸ https://visualvm.java.net ▸ fotos: Dani Teston

×