-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2009-03-18 at 12:58 -0500, Boyd Stephen Smith Jr. wrote:
Even if a page in swap is needed, it isn't removed from swap as soon as it is in RAM. Instead, the kernel waits until the RAM page is written to before invalidating the swap page. This way, if memory pressure increase again, no actual writes to swap have to occur to swap that page out. For this reason, the pages containing nothing but configuration data for long- running processes will generally stay in swap until that process dies once they are swapped out.
I didn't know this; interesting. Is then that page listed as "used swap"?
I *think* it is possible for requests to allocate buffer/cache memory (file system operations) to cause pages to swap out, but that's rather rare if it can happen at all.
When memory is scarce, it can happen. I suppose it makes sense to free some memory for buffers/cache if i/o is high.
If it truly bothers you to have stuff in swap, you can use a quick swapoff/swapon to force the swap to be expired.
That would make the system "worse", because it increases the used ram. Once something goes to swap, leave it.
(Linux is very smart about memory management. If you are using swap, there's probably a good reason.)
Exactly :-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknCa/gACgkQtTMYHG2NR9WtywCgiUhWYM6nPiZ1GTZRDcsW1f3f 1IgAnR2sPbXTgqj34Xw1sn8xMdAC9xTO =+sLZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org