Xymon Mailing List Archive search

OT: CentOS mem usage.

6 messages in this thread

list Thomas Pedersen · Wed, 23 May 2007 09:06:07 +0200 ·
Hi all,

Totally off topic question but I guess here are at least 1 person with the right answer.

On my CentOS server I have 2 GB memory, however hobbit shows me that the used memory is slowly being used and never freed. How can I determine which application has the mem leak ? Doing a lot of ps commands only produces a list of processes with less than 1% mem usage.

TIA

/Thomas
list Frédéric Mangeant · Wed, 23 May 2007 09:08:59 +0200 ·
quoted from Thomas Pedersen
Thomas a écrit :
Hi all,

Totally off topic question but I guess here are at least 1 person with the right answer.

On my CentOS server I have 2 GB memory, however hobbit shows me that the used memory is slowly being used and never freed. How can I determine which application has the mem leak ? Doing a lot of ps commands only produces a list of processes with less than 1% mem usage. 

Hi

can you run that :

$ free -m
             total       used       free     shared    buffers     cached
Mem:            91         85          6          0         28         23
-/+ buffers/cache:         34         57
Swap:          192         85        107

On this machine, memory used by applications is only 34 Mb

-- 

Frédéric Mangeant

Steria EDC Sophia Antipolis
list Pascal Lehnert · Wed, 23 May 2007 09:14:57 +0200 ·
Hi Thomas,

to find the application which consumes the mem, just start "top"
and sort by mem with "M".

regards,
Pascal 
quoted from Frédéric Mangeant

-----Ursprüngliche Nachricht-----
Von: Thomas [mailto:user-97316fb2dd2a@xymon.invalid] 
Gesendet: Mittwoch, 23. Mai 2007 09:06
An: user-ae9b8668bcde@xymon.invalid
Betreff: [hobbit] OT: CentOS mem usage.

Hi all,

Totally off topic question but I guess here are at least 1 person with the right answer.

On my CentOS server I have 2 GB memory, however hobbit shows me that the used memory is slowly being used and never freed. How can I determine which application has the mem leak ? Doing a lot of ps commands only produces a list of processes with less than 1% mem usage.

TIA

/Thomas
list Thomas Pedersen · Wed, 23 May 2007 12:34:11 +0200 ·
Hi Pascal,

But I have tried this, and it gives me the application which has only 1.8% of the memory. I need an overview of each process and what memory is actually used by it. If its a memory leak will the original process still own the memory ?

I am affraid I am not a linux guru so I dont know how linux manages the memory. Ie if a applcation frees some memory will the manager only release it after some time in case the application need some memory soon, or will it keep it until all available memory is used and only then start to free unused memory ?

Regards, Thomas
quoted from Pascal Lehnert

Pascal Lehnert wrote:
Hi Thomas,

to find the application which consumes the mem, just start "top"
and sort by mem with "M".

regards,
Pascal 
-----Ursprüngliche Nachricht-----
Von: Thomas [mailto:user-97316fb2dd2a@xymon.invalid] Gesendet: Mittwoch, 23. Mai 2007 09:06
An: user-ae9b8668bcde@xymon.invalid
Betreff: [hobbit] OT: CentOS mem usage.

Hi all,

Totally off topic question but I guess here are at least 1 person with the right answer.

On my CentOS server I have 2 GB memory, however hobbit shows me that the used memory is slowly being used and never freed. How can I determine which application has the mem leak ? Doing a lot of ps commands only produces a list of processes with less than 1% mem usage.

TIA

/Thomas

list Henrik Størner · Wed, 23 May 2007 14:02:31 +0200 ·
quoted from Thomas Pedersen
On Wed, May 23, 2007 at 12:34:11PM +0200, Thomas wrote:
But I have tried this, and it gives me the application which has only 1.8% of the memory. I need an overview of each process and what memory is actually used by it. If its a memory leak will the original process still own the memory ?
top and ps show how much memory is used by processes. If that doesn't account for all of the memory being used on the box, then it has to be
the Linux kernel which has allocated this memory - you can check the "free" output for a brief summary of how much memory is used, and the output from "cat /proc/slabinfo" will give you a breakdown of the kernel
memory allocations. (The "slabinfo" manpage has details about what these
mean).

I have seen leaks in the kernel affect memory usage, so this is not
as bizarre as it may seem. In fact, the "slab" column on the Hobbit demo
site http://www.hswn.dk/hobbit/servers/servers.html was created to track one of these.


Regards,
Henrik
list Brian Scott · Thu, 24 May 2007 11:56:25 +1000 ·
A good operating system should attempt to use all available memory. Why
have it when you don't use it? The way it uses it is to create a cache
of things seen on disk. Next time you need the same data from disk an IO
(a few milliseconds) is saved. Naturally it can throw this away in an
instant if a more pressing need (like an application program) comes
along. It makes sense to do repeat this process with all available
memory.

While I can't directly speak for Linux, I have noticed that most other
systems will slowly drift up to 80-90% of installed memory in use and
just sit there (the little bit of free is essentially for emergency
use).

That's not to say that you don't have a memory leak in the kernel that
others have suggested, it just means that there is a perfectly normal
reason for it that is also plausible. A far better measure of memory
adequacy is in paging rates, but even that is suspect when normal IO is
managed through the paging system with mmap most of the time these days.
quoted from Thomas Pedersen

-----Original Message-----
From: Thomas [mailto:user-97316fb2dd2a@xymon.invalid] 
Sent: Wednesday, 23 May 2007 5:06 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] OT: CentOS mem usage.

Hi all,

Totally off topic question but I guess here are at least 1 person with 
the right answer.

On my CentOS server I have 2 GB memory, however hobbit shows me that the

used memory is slowly being used and never freed. How can I determine 
which application has the mem leak ? Doing a lot of ps commands only 
produces a list of processes with less than 1% mem usage.

TIA

/Thomas


**********************************************************************

This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************