On Wed, 2013-01-30 at 03:31 -0800, Fernando de Oliveira wrote:
> 2. How a system with so much RAM is swapping?

Because swap isn't just extra memory to use once RAM runs out. I don't
know specifics for Linux, but the OS is free to pre-emptively move data
from RAM to swap if it thinks it's appropriate to do so.

For example, if that data hasn't been used in a while, it might page it
out while the system isn't too busy, so that it doesn't need to do so
should you suddenly want all that memory in future. Or it might decide
that taking that memory for extra disk cache is a more efficient use,
worth the cost of pulling that data out of disk if it's needed.

I emphasize that this is theory, not necessarily what Linux is actually
doing. The point is simply that the kernel's memory management is more
complicated than just "use swap if no RAM remaining".

Simon.

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to