kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* release used memory
@ 2011-03-11 17:54 Andreas Leppert
  2011-03-11 18:22 ` Rajat Sharma
  2011-03-12  1:26 ` Mulyadi Santosa
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Leppert @ 2011-03-11 17:54 UTC (permalink / raw)
  To: kernelnewbies

Hello,

for study reasons, I evaluate a kernel module by running a parallel version of
bzip. Input data are some senseless data files (500 x 10MB for example). While
the bzip program runs, I took a look at the output of top and noticed
something which I do not understand.

In the following, I'm refering to that two lines of top which look something
like that:

Mem:   8185716k total,  5603224k used,  2582492k free,     9104k buffers
Swap:  8388604k total,        0k used,  8388604k free,  5374400k cached

While the bzip program runs, it uses memory and thus, the value before "free"
in the Mem: line is getting smaller. As you can see above, there is also some
"cached stuff" (5374400k). What is meant by this value? Someone explained me
that it has to do something with filesystem buffers which were read or
written. Could you elaborate on this?

If I have enough input data, the memory is not enough (the "free" value gets
smaller and smaller, and the "cached" value gets bigger and bigger). Then
kswapd appears in the list of running processes. I would expect that Linux
gets rid of the "cached" stuff so that the program gets more memory. Instead,
nothing happens and kswapd is activated. What's the sense of keeping some
filesystem buffers when they are not used anymore?

The main problem is that I do not understand what by "buffers" and "cached" is
meant. It would be nice if you can help me on this.

Thanks in advance
Andreas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-13  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-11 17:54 release used memory Andreas Leppert
2011-03-11 18:22 ` Rajat Sharma
2011-03-12  1:26 ` Mulyadi Santosa
2011-03-12 21:18   ` Andrzej Kardas
2011-03-13  8:32   ` Andreas Leppert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).