I am trying to analyze/profile a core JAVA application.
I am using JConsole with Eclipse MAT.
I observed following in Perm-Gen graphs(data recorded in 1 hour duration on a Windows XP machine):
Code-Cache:
- At recording start: 7MB
- After 1 hour: 10.5 MB
- Graph looks like: slantedline slightly going up increasing at intervals.
Memory Pool Perm-Gen(Shared-rw):
- At recording start: 7MB
- After 1 hour: 7 MB
- Graph looks like: parallel to X axis.
Memory Pool Perm-Gen(Shared-r0):
- At recording start: 5.5MB
- After 1 hour: 5.5MB
- Graph looks like: parallel to X axis.
Memory Pool:
- At recording start: 21MB
- After 1 hour: 22.5 MB
- Graph looks like: slantedline slightly going up/down increasing at intervals.
My question is,
- What can be inferred such behaviour of Perm-Gen space for each of the above category ?
- What should be the ideal behaviour to look for each of the above category ?
Ideal behaviour here refers to a state which represents:
- Application is performing at best.
- Application does not have any memory related problems.
- No improvements are needed in code, to improvise resource utilization.
Above question is also applicable for Heap space analysis.
Below are additional clarifications:
Its true that profiling should be done in same env as that of production. But it would really help if I can understand what is the real target here. As of now, I am trying to learn the same. Then in future, I will try to do it on production.
Also, I am trying to compare two code bases(one refactored and one old). I want to know the extent of benefits which are achieved by refactoring(as quantitative data). I think if I am recording results on same platform, comparison will hold true(regardless of Production or Development ).
UPDATE 1:
- I further ran application for more than 8 hours straight.
- I used GCViewer:1.31 to get GC information.
- I am attaching the data gathered from GCViewer.
- I observed that in every 30 seconds, one FULL GC event was happening. This concludes that lots of objects are
log-living
. - I need further information. I am really not sure how to interpret these details correctly and completely.
Please have a look at the attachment. Please provide inputs.