The Artima Developer Community
Sponsored Link

Java Buzz Forum
jvmstat

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Nick Lothian

Posts: 397
Nickname: nicklothia
Registered: Jun, 2003

Nick Lothian is Java Developer & Team Leader
jvmstat Posted: Oct 22, 2003 6:32 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Nick Lothian.
Original Post: jvmstat
Feed Title: BadMagicNumber
Feed URL: http://feeds.feedburner.com/Badmagicnumber
Feed Description: Java, Development and Me
Latest Java Buzz Posts
Latest Java Buzz Posts by Nick Lothian
Latest Posts From BadMagicNumber

Advertisement

As menti oned yesterday, I've been playing with jvmstat. It allows you to visually watch garbage collection going on in your application. It's quite fascinating to watch the difference as you try different garbage collection algorithms. For instance, using the -XX:+AggressiveHeap algorithm makes a huge difference to the amount of GC Time (or at least it did in my benchmark).

It's also very helpful in understanding how the various garbage collection algorithms work - something I've always glossed over in the past.

Below are some traces from JBoss being hit pretty hard by an increasing number of clients. The first image shows it just starting up - note that there has been little memory reclaimed by the old generation garbage collector. In the second image you can see the saw tooth pattern in the old generation memory usage. It is also interesting to see the copying of object between the two survivor generations.

jvmstat Graph jvmstat Graph

The third image shows the use of the AggressiveHeap garbage collector. Note that most of the objects don't even make it out of the Eden pool. My hypothesis is that this shows that most of my objects are short lived. A lot less time is spent doing GC, too - compare the occasional spikes in the GC time graph to the almost continual GC in the previous example.

Some useful links:

  • Tuning Garbage Collection with the 1.4.2 JavaTM Virtual Machine
  • Diagnosing a Garbage Collection problem
  • Frequently Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual Machine
  • Read: jvmstat

    Topic: Blogs are getting sexier Previous Topic   Next Topic Topic: OS as a Subscription Service

    Sponsored Links



    Google
      Web Artima.com   

    Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use