Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Problems understanding RAM usage in top (http://www.linux-archive.org/debian-user/76133-problems-understanding-ram-usage-top.html)

David 04-25-2008 04:46 PM

Problems understanding RAM usage in top
 
Hi list.

Is it normal for 'top' to show that most of your physical memory is
used when there aren't any processes running? (besides the usual init,
getty, klogd, sshd, etc).

I assume that this memory is being used for Linux caches - file
buffers etc to speed up disk access and so on. Is there a way to tell
how much memory the Linux kernel is using, and what for?

I'm busy tracking down OOM killer issues on a server and I'm wondering
if there is a memory leak somewhere (eg: lvm or another kernel
module). Nothing (besides the usuals) is running, but top is showing
900/1024 MB ram used, and 158/1024 MB swap used.

David.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Ron Johnson 04-25-2008 06:38 PM

Problems understanding RAM usage in top
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/25/08 11:46, David wrote:
> Hi list.
>
> Is it normal for 'top' to show that most of your physical memory is
> used when there aren't any processes running? (besides the usual init,
> getty, klogd, sshd, etc).

Yes.

> I assume that this memory is being used for Linux caches - file
> buffers etc to speed up disk access and so on.

Yes.

> Is there a way to tell
> how much memory the Linux kernel is using, and what for?

Not really. Kernel 2.6.26 should expose better memory usage data,
but apps like top(1) will have to be rewritten to use the new info.

> I'm busy tracking down OOM killer issues on a server and I'm wondering
> if there is a memory leak somewhere (eg: lvm or another kernel
> module). Nothing (besides the usuals) is running, but top is showing
> 900/1024 MB ram used, and 158/1024 MB swap used.

- --
Ron Johnson, Jr.
Jefferson LA USA

We want... a Shrubbery!!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIEiUnS9HxQb37XmcRAlv0AJ9bdynCZUNZoktfKm2DtN ijkUFXywCgg5Hp
ZkjCVLaytwWys3OrDP1SPkM=
=FGMV
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

"s. keeling" 04-26-2008 03:27 AM

Problems understanding RAM usage in top
 
Ron Johnson <ron.l.johnson@cox.net>:
> On 04/25/08 11:46, David wrote:
> >
> > Is it normal for 'top' to show that most of your physical memory
> > is used when there aren't any processes running? (besides the
> > usual init, getty, klogd, sshd, etc).
>
> Yes.

Yup.

> > I assume that this memory is being used for Linux caches - file
> > buffers etc to speed up disk access and so on.
>
> Yes.

Ditto. Type free. For a personal workstation, the relevant bit's how
much swap's used. Where's your memory? Look at the size of that
massive /proc/kcore of yours. No, don't try to delete it. :-)

> > Is there a way to tell how much memory the Linux kernel is using,
> > and what for?
>
> Not really. Kernel 2.6.26 should expose better memory usage data,
> but apps like top(1) will have to be rewritten to use the new info.

Er, what? Have we done away with RSS and VSZ, or are they just
momentarily lost? Is this Sid stuff?

> We want... a Shrubbery!!

JMO, you need a new .sig, but who am I to talk?


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Ron Johnson 04-26-2008 03:44 AM

Problems understanding RAM usage in top
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/25/08 22:27, s. keeling wrote:
> Ron Johnson <ron.l.johnson@cox.net>:
>> On 04/25/08 11:46, David wrote:
[snip]
>
>>> Is there a way to tell how much memory the Linux kernel is using,
>>> and what for?
>> Not really. Kernel 2.6.26 should expose better memory usage data,
>> but apps like top(1) will have to be rewritten to use the new info.
>
> Er, what? Have we done away with RSS and VSZ, or are they just
> momentarily lost? Is this Sid stuff?

http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-linux.html

Depending on how you look at it, ps is not reporting the real
memory usage of processes. What it is really doing is showing
how much real memory each process would take up if it were the
only process running. Of course, a typical Linux machine has
several dozen processes running at any given time, which means
that the VSZ and RSS numbers reported by ps are almost
definitely "wrong". In order to understand why, it is necessary
to learn how Linux handles shared libraries in programs.

>> We want... a Shrubbery!!
>
> JMO, you need a new .sig, but who am I to talk?

Spam and eggs? Eggs and spam?

- --
Ron Johnson, Jr.
Jefferson LA USA

We want... a Shrubbery!!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIEqUtS9HxQb37XmcRApxIAKCCSv0gm/FicOyffD9pcljisuu3wACgnCnt
JcrbEA3Vi/hQiZWmt3I0VnU=
=TIMV
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 10:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.