Operating System - Linux
1753676 Members
5508 Online
108799 Solutions
New Discussion юеВ

Re: A process consumes memory constantly

 
John Guster
Trusted Contributor

A process consumes memory constantly

java.bin process "RES"(Resident size) of "top" command is increasing as time goes by, it never reaches a certain value. We have to reboot the system when all swap is exhausted. Is this an indication of memory leak? In the man page of top it says "RES" = CODE + DATA. One would think "RES" has to be a certain size, can not be grow unbounded. It is Red Hat Linux 4 system. The Java is IBM's.
Any idea will be appreciated.
6 REPLIES 6
S.N.S
Valued Contributor

Re: A process consumes memory constantly

Hi John,

Is Oracle running on RHEL?
Any specific messages?

The Expert here could help better...

SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison
John Guster
Trusted Contributor

Re: A process consumes memory constantly

Below is part of the top output:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7498 appadm 18 0 2209m 391m 3756 S 0.0 19.3 0:02.30 java.bin
Note that RES=391m, it is keeping growing to the point system has to be rebooted. There is no oracle, not any error while it is growning.


Steven E. Protter
Exalted Contributor

Re: A process consumes memory constantly

Shalom,

http://www.hpux.ws/?p=8

There is a Linux version or rather Linux code in that shell script.

It will help you identify the process, which you already seemed to have done.

Normally this is fixed by patching the application.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: A process consumes memory constantly

>>> Is this an indication of memory leak?

Nornally yes, you can use pmap to identify how much "private" (anonymous) memory the process is using.


A good document can be found here:

http://blogs.sun.com/nickstephen/entry/solaris_measuring_the_memory_overhead
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
John Guster
Trusted Contributor

Re: A process consumes memory constantly

It seems it is used for the heap which has max limit set. Before it reaches the max, it will appear as memory leaking because it is growning and growning...thanks for your ideas.
Dennis Handly
Acclaimed Contributor

Re: A process consumes memory constantly

>it will appear as memory leaking because it is growing and growing

Java has a different definition of memory leak because it has garbage collection.