jmap hanging and non-responsive

Please take some time in answering the jmap issue that we are facing in our production environment.

We use jmap to frequently attach to a production server to get the heap related statistics. But some times this operation is making the system hang, slow down the target JVM and finally making the host machine non-responsive.

We are using the below command on Linux_x86 JDK 1.5.0_11 where target JVM & jmap are running on the same machine.

%jmap -Xmx512m -heap:format=b 12345

Question is typically how much time does jmap takes to retain a dump file when attached to a production JVM (a very busy server)? Or adding any JVM options to target VM or jmap help?

Will jmap slows down the target JVM? Also will jmap pauses the target machine during the process of the heap snap shot?

[820 byte] By [BalaSubrahmanyama] at [2007-11-27 2:19:37]
# 1

You really need jdk6 to take a snapshot of the heap of a running system. The jmap option to do that is -dump. The -heap:format=b option you are using is to recover a heap dump from a core file or hung process. It very much for post-mortem diagnostics and isn't suitable for running on a production system (as the target process can be suspended for a long time).

alan.batemana at 2007-7-12 2:20:21 > top of Java-index,Core,Monitoring & Management...