On 2012-08-27 20:41, Edward Ned Harvey (lopser) wrote:
Here is what swap is meant for:
At every opportunity, the kernel will grow the system buffer & cache to consume all physical
memory in the system. It is normal to see near-zero "free" memory in the system,
provided that you have a large cache & buffer.
If you give some swap to the kernel, then it has an extra degree of freedom.
The kernel now has freedom to choose, which it would rather lose: Some fairly
cold cache, or some idle memory? It is normal for some processes to sit almost
completely idle for the life of the computer. Or some process dies in a zombie
state, or whatever. Swap is useful, so the kernel can push these things out of
memory and use that memory for caching instead. Swapping is meant to increase
performance.
It must be nice to live in such an absolute and simple world!
Swap used to be for being able to accommodate more processes than you had
memory for, and yes it sometimes lead to the situation you described, known as
trashing.
These days I, personally, see swap for emergencies (I need a bit more memory,
right now, say so I can log in to understand what's going on), to be able to
take memory dump in case of OS lockup, and for laptop to be able to hibernate.
I for one, totally disagree with your statement, I do not want any of my
process to be pushed to swap to just buy some buffer space. If I have an I/O
issue, I'll look into it. This is why I set swappiness to zero on Linux, and I
sure wish there was a way to do that on Windows!
--
Yves. http://www.SollerS.ca/
http://ipv6.SollerS.ca
http://blog.zioup.org/
_______________________________________________
Tech mailing list
Tech@lists.lopsa.org
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
http://lopsa.org/