PDA

View Full Version : Memory Profiling Tool for Java



zfranciscus
October 30th, 2009, 03:56 AM
Hi,

I am trying to monitor the memory usage of my java program. As of now I am using 'Top'. Top is a command line tool that shows you the memory usage of your program. The out put is similiar to the following:

$# top -p <pid>

Output:

PID: <PID>
User: <user>
VIRT: 513M
%MEM: 25.1

I am trying to find a better memory monitoring tool that can show me what are the java objects that resides in the memory, their size, etc.

Anyone has a suggestion ?



Cheers,

myrtle1908
October 30th, 2009, 05:24 AM
There are many Java profilers out there, some free some not.

Have a look at VisualVM ... https://visualvm.dev.java.net/

Also some good info here http://olex.openlogic.com/wazi/2009/how-to-fix-memory-leaks-in-java/

slavik
October 30th, 2009, 06:25 AM
VisualVM/Jconsole, combined with proper verbosegc options. :)

also, there is jstat/jmap

kavon89
October 30th, 2009, 04:42 PM
NetBeans has a very nice profiler.