This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Java Heap dump Size and Resident Memory(RES) Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Heap dump Size and Resident Memory(RES) Size" Watch "Java Heap dump Size and Resident Memory(RES) Size" New topic
Author

Java Heap dump Size and Resident Memory(RES) Size

krishna bulusu
Ranch Hand

Joined: Aug 28, 2006
Posts: 185
Hi,

We have our production running under Red ha Linux environment. We are using JDK 1.5.19 version. We are using Tomcat 6.0.18 as our web server.
What we observe is, the heap dump size and the resident memory sizes are not matching at all. If the Resident memory(RES) size is at 2GB, the heap dump size is 220MB. We are having a huge performance hit due to this.
Is this normal pattern or are we facing memory leak? We have analyzed the heap dump and fixed few issues in it. However, what we think is, memory is leaking not in the heap but some where else. Please can somebody help us on this.


Thanks&Regards, Krishna.
SCJP1.4, SCWCD1.4, SCBCD 5.0
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What tool(s) are you using to analyze memory usage? That'll be much quicker than us guessing.
krishna bulusu
Ranch Hand

Joined: Aug 28, 2006
Posts: 185
Hi,

Thanks for your reply.
I am producing the heap dump by following method:
kill -3 <pid>

After the above command, a heap dump in being produced in hprof format

We are using Eclipse Memory Analyzer tool to analyze the heap dump. Initially, It has shown few leak suspects which I have fixed. Now, the heap seems to be OK. However, the size of the Resident memory is alarming and not matching with the size of the heap dump.


krishna bulusu
Ranch Hand

Joined: Aug 28, 2006
Posts: 185
Hi,

Please can somebody help me?

Thanks,
Bala.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I'm not sure how you expect us to help. I'd try using a memory profiling tool, there are many available.
krishna bulusu
Ranch Hand

Joined: Aug 28, 2006
Posts: 185
Hi Newton,

My question is: Is there are any relation between the Resident size and the heap dump size for java process on Linux systems? For us, the Resident memory size is 2GB where as the heap dump size is about 300MB. Is this normal or do you see any issues with this?

 
jQuery in Action, 2nd edition
 
subject: Java Heap dump Size and Resident Memory(RES) Size
 
Similar Threads
Java Heap dump Size and Resident Memory(RES) Size
Top In Unix. What's the diff between SIZE and RES
what is the default size of java heap
CPU Load is high on web server
Process RES size Java linux composition