Memory profiling in Production environment

F

fidentityc

Hi all,

I've observed from that the GC logs that there is an unmistakable
upward trend that does not come down to it's original levels. This
has led me to suspect that there is a potential memory leak in the
codes.

I've tried to profile the codes in a test environment but to no
avail. This could be because the leak takes place in a section of the
code which is not actively tested in the test environment. As there
are quite a number of applications deployed within the container, and
automated testing is not available, it may prove rather difficult to
go through all test cases in a brute force manner in an attempt to
replicate the issue.

As such, I would like to ask if there is any way to (periodically)
capture memory snapshots of the Production heap that can subsequently
be downloaded for offline analysis. I understand there may be some
performance penalty and I would be grateful if anyone could advise if
the overhead is negligible.

Please feel free to also offer me advise if there are better ways of
achieving my aims.

Thanks in advanced.
 
L

Lew

Hi all,

I've observed from that the GC logs that there is an unmistakable
upward trend that does not come down to it's original levels.  This
has led me to suspect that there is a potential memory leak in the
codes.

I've tried to profile the codes in a test environment but to no
avail.  This could be because the leak takes place in a section of the
code which is not actively tested in the test environment.  As there
are quite a number of applications deployed within the container, and
automated testing is not available, it may prove rather difficult to
go through all test cases in a brute force manner in an attempt to
replicate the issue.

As such, I would like to ask if there is any way to (periodically)
capture memory snapshots of the Production heap that can subsequently
be downloaded for offline analysis.  I understand there may be some
performance penalty and I would be grateful if anyone could advise if
the overhead is negligible.

Please feel free to also offer me advise if there are better ways of
achieving my aims.

<http://download.oracle.com/javase/6/docs/technotes/tools/share/
jmap.html>
<http://java.sun.com/developer/technicalArticles/J2SE/monitoring/>

There are a number of tools specific to different application servers,
such as ITCAM for WebSphere Application Server.

GIYF.
 
F

fidentityc

<http://download.oracle.com/javase/6/docs/technotes/tools/share/
jmap.html>
<http://java.sun.com/developer/technicalArticles/J2SE/monitoring/>

There are a number of tools specific to different application servers,
such as ITCAM for WebSphere Application Server.

GIYF.

Thanks for the links Lew. I'm however on Java 5. JConsole seems to
come the closest to any kind of monitoring, but what i'm really keen
on is to take snapshots at regular intervals for offline analysis so
that i can determine which objects cannot be garbage collected.

I'm still doing my research but would you know of any tools that
captures snapshots of the heap at regular intervals?

Thanks a lot.
 
F

fidentityc

Thanks for the links Lew.  I'm however on Java 5.  JConsole seems to
come the closest to any kind of monitoring, but what i'm really keen
on is to take snapshots at regular intervals for offline analysis so
that i can determine which objects cannot be garbage collected.

I'm still doing my research but would you know of any tools that
captures snapshots of the heap at regular intervals?

Thanks a lot.

Actually that's alright. I think I'll just cron jmap to capture the
heap at regular intervals. Thanks a lot for the help.
 
L

Lew

fidentityc said:
As such, I would like to ask if there is any way to (periodically)
capture memory snapshots of the Production heap that can subsequently
be downloaded for offline analysis. I understand there may be some
performance penalty and I would be grateful if anyone could advise if
the overhead is negligible.

Don't quote sigs.

You can use jmap and jhat in J5.
come the closest to any kind of monitoring, but what i'm [sic] really keen
on is to take snapshots at regular intervals for offline analysis so
that i [sic] can determine which objects cannot be garbage collected.

I'm still doing my research but would you know of any tools that
captures snapshots of the heap at regular intervals?
....
Actually that's alright. I think I'll just cron jmap to capture the
heap at regular intervals. Thanks a lot for the help.

Use jhat to analyze the dumps that jmap produces. There are also other tools.
<http://download.oracle.com/javase/6/docs/technotes/tools/share/jhat.html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top