Operating System - Linux
1827295 Members
4095 Online
109717 Solutions
New Discussion

Linux Memory Leak / Problem

 
Vijayakumar  S
Advisor

Linux Memory Leak / Problem

Dear All,

We face MEMORY problem in our test box is a DL380 G3, the prod
box is a DL580 G2.

The Prod box is having 6 GB of RAM. It consume all the memory.
#free -mt
total used free shared
buffers cached
Mem: 5526 5519 6 105
216 2952
-/+ buffers/cache: 2349 3176
Swap: 2047 1831 216
Total: 7574 7351 222

The box is DB Server and Webserver.
Weblogic is Running.

When I analyis i think Java consume More Memory.

ps -el | sort -nr -k10 | head
040 S 2000 6438 31203 0 80 5 - 134274 rt_sig ?
00:00:00 java
040 S 2000 31284 31203 0 80 5 - 134274 rt_sig ?
00:00:24 java
040 S 2000 31283 31203 0 80 5 - 134274 rt_sig ?
00:00:23 java
040 S 2000 31282 31203 0 80 5 - 134274 rt_sig ?
00:00:22 java
040 S 2000 31281 31203 0 80 5 - 134274 schedu ?
00:00:00 java
040 S 2000 31280 31203 0 80 5 - 134274 schedu ?
00:00:09 java
040 S 2000 31278 31203 0 80 5 - 134274 schedu ?
00:00:00 java
040 S 2000 31277 31203 0 80 5 - 134274 schedu ?
00:00:00 java
040 S 2000 31275 31203 0 80 5 - 134274 rt_sig ?
00:00:00 java
040 S 2000 31274 31203 0 80 5 - 134274 rt_sig ?
00:00:00 java


Both the test and prod boxes have the same problem.
redhat-release is :
Red Hat Linux Advanced Server release 2.1AS (Pensacola)

uname -a
Linux xxxxxx 2.4.9-e.49enterprise #1 SMP Fri Aug 6 11:32:58
EDT 2004 i686 unknown


Could anybody help me what went wrong & the exact problem with
the box.

Thanks in Advance.

S.Vijayakumar
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Linux Memory Leak / Problem

More than likely you are correct. A couple of top snapshots could tell you the same thing. You would see the java process memory increase.

More stealthy are short term processes or threads that fail to return memory properly to the heap when the close. Linux is not supposed to let that happen either.

Things to think about:

1) Update your java programs and jvm and jdk and jre libraries. Patches, replacements whatever.

2) Getting and testing the latest kernel.

Kernels can leak too, or let it happen.

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
Vijayakumar  S
Advisor

Re: Linux Memory Leak / Problem

Hi,

Can anybody tell me how much memory is used
by the JAVA.

When I do
top -b -n1 | grep java

30704 helloprod 30 5 178M 171M 138M S N 0.0 3.1 0:12 java
30706 helloprod 20 5 178M 171M 138M S N 0.0 3.1 0:00 java
30707 helloprod 20 5 178M 171M 138M S N 0.0 3.1 0:44 java
30708 helloprod 20 5 178M 171M 138M S N 0.0 3.1 0:00 java


There are 160 line with Java
I want to know how to calcualate the Memory.

Thanks
S. vijayakumar
Steven E. Protter
Exalted Contributor

Re: Linux Memory Leak / Problem

Just take another top picture in an hour.

Then compare by process ID. If there is a leak, those 178M figures will increase. If not, look elsewhere.

Its not the total that matters. Its the individual processes using more and more memory over time. Thats the definition of the problem you have presented.

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