LWN.net Logo

Memory footprint

Memory footprint

Posted Jun 13, 2006 0:34 UTC (Tue) by proski (subscriber, #104)
Parent article: Live CDs Part II: Desktop Replacements

As with KNOPPIX, this GNOME desktop system is heavy on memory use, using 219MB out of 224MB available according to "top". This is expected behavior for this class of live CDs so be certain to have plenty of memory.
What is that memory used for? I this a good chunk of it is used for cache and filesystem buffers. In fact, my system with 1 gigabyte of RAM is currently using 979732k, of which 61684k is "buffers" and 676912k is "cached". The memory usage without buffers and cache is 241136k, which is not so bad, considering that I have 4 tabs open in Firefox plus 6 xterm windows. And this is a 64-bit system.

I hope the author will learn something about memory management before posting the review for "Small Footprint live CDs".


(Log in to post comments)

Memory footprint

Posted Jun 13, 2006 1:28 UTC (Tue) by JoeBuck (subscriber, #2330) [Link]

To be fair, there isn't really a way to figure out much about memory use from the output of top or htop; they give too confusing a picture.

Memory footprint

Posted Jun 13, 2006 5:18 UTC (Tue) by jzbiciak (✭ supporter ✭, #5246) [Link]

Agreed. It's been a long standing complaint "Linux uses all my memory! Where did it go?" going back to probably before I started using Linux, back in 1993.

Most of it does go to disk buffers and shared pages. My own motto is unused memory is wasted memory. The real performance analysis comes from looking at things like vmstat, and whether you have lots of swap or paging traffic.

Available = "Free" (unused) + Cached

Posted Jun 13, 2006 6:30 UTC (Tue) by AnswerGuy (guest, #1256) [Link]

I teach my students that the best, simplest approximation of their available memory is the "cached" *plus* "free" (which I translate to "unused" to better explain the meaning in top and the "free" command).

Yes, it's an simplication; but it's a useful one.

Then I teach them to watch the si and so (swap in and swap out) columns under vmstat for at least a couple minutes of sustained three digit values before declaring their system to be "out of memory."

JimD

Available = "Free" (unused) + Cached

Posted Jun 13, 2006 6:57 UTC (Tue) by jwb (guest, #15467) [Link]

Another, more reliable indicator of being truly out of memory is when vmstat takes 5 minutes paging itself in before outputting each line :)

Available = "Free" (unused) + Cached

Posted Jun 13, 2006 19:05 UTC (Tue) by oak (guest, #2786) [Link]

> simplest approximation of their available memory is
> the "cached" *plus* "free"

Why you aren't adding "buffers" too?

Memory footprint

Posted Jun 15, 2006 19:59 UTC (Thu) by landley (guest, #6789) [Link]

If you "cat /proc/meminfo", the first few lines are:

MemTotal: 516228 kB
MemFree: 51432 kB
Buffers: 19104 kB
Cached: 133532 kB
SwapCached: 131464 kB

In my case, I have a total of 516 megabytes of memory (after the kernel's
had its bite, and yes it's a decimal megabytes from binary kilobytes. I
don't care).

Of this 51 megs isn't used for anything, and 131 megs is sitting in swap
(although since I've suspended the system to disk since booting, both are
kinda expected).

About 150 megs (buffers+cached) are used for filesystem cache. That's the
amount that your apps aren't really using, and the number you might want
to subtract from the total when coming up with how much memory is really
in use by your apps.

I'd estimate I easily have over 100 open windows/tabs in my six desktops
at the moment, by the way...

Rob

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds