4

We've been using jmap for ~2 years to measure heap size on a large, multi-server app, running under Java 6. We take a measurement every minute. Each measurement took (elapsed time) less than 1 second.

We're now testing the same app under Java 7. And now suddenly jmap frequently takes 10 seconds, 20 seconds, sometimes longer, and it seems to slow down (or perhaps even stop!) the JVM during that time.

The only difference we see in the jmap output (between Java 6 and Java 7) is the additional information about how many Strings were interned. (And it seems like that's the part that is slower.)

Does anyone know what is going on, or what changed in jmap or Java 7 that might cause this?

We're testing using "jstat -gc" to get the same information, and so far that seems much faster, and does not appear to cause the app slowdowns we saw with jmap. Are there any other suggestions for how to measure heap size, quickly?

Any thoughts are welcome, thanks in advance.

Charles Roth
  • 798
  • 5
  • 8
  • 1
    Possibly related questions at http://stackoverflow.com/questions/20832793/java-get-heap-dump-without-jmap-or-without-hanging-the-application?rq=1 and http://stackoverflow.com/questions/5287010/is-jvm-stopped-while-executing-jmap?rq=1 – Charles Roth May 16 '14 at 20:15

1 Answers1

0

I personally quite like Oracle Mission Control for monitoring the heap size. It has many more options, but it works like a charm to monitor the heap size.