[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[OT] tuning kernel memory usage



Hey folks.  This question has been nagging at me for a while now, and
it's about time I asked.  I've got a Debian box (potato, upgraded to
kernel 2.4.1, but that's irrelevant).  I'm seeing swap usage that I
don't understand.  Here's the output of 'free':

             total       used       free     shared    buffers cached
Mem:         78024      70932       7092          0        980 43628
-/+ buffers/cache:      26324      51700
Swap:       289160       5372     283788

So you see that there is some swap usage (5372k).  You also see that
over 43 megs of RAM are used as cache and over 7 megs are completely
free.  So my question is: Why is any swap being used at all?

I've read /usr/src/linux/Documentation/sysctl/vm.txt, which I believe
documents exactly what I need to change, but I'm not sure exactly what I
need to set.  I believe that the pagecache entry in /proc/sys/vm is what
I'd want to change, but the relevant section in vm.txt has me a bit
confused.  Here's the confusing section:
===
When your system is both deep in swap and high on cache,
it probably means that a lot of the swapped data is being
cached, making for more efficient swapping than possible
with the 2.0 kernel.
===
Now, does this mean that the swapped-out pages are cached in RAM?
What's the point of that?  Why swap them out at all if you still keep
them in RAM?

Can anybody enlighten me here?

Thanks in advance.
noah

-- 
 _______________________________________________________
| Web: http://web.morgul.net/~frodo/
| PGP Public Key: http://web.morgul.net/~frodo/mail.html 



Reply to: