Roger Barnes wrote:
Reduce your SWAP to between 1 X 1 to 1 X 2 RAM.
Ideally 1 X 1 RAM-to-swap.
I know that's the standard recommendation one sees for creating swap partitions, but
I'm intrigued as to the reasons for your suggestion. How does reducing the swap:ram
ratio improve performance? I expect the kernel would be conservative about using swap
irrespective of how much there is.
1:1 RAM-to-swap is not at all ideal if your applications need 2Gb of memory and you've
only got 512Mb swap to go with your 512Mb RAM and the machine crashes.
My understanding is that having plenty of swap space isn't a bad thing if you can spare the space and are likely to make use of it. I'd like to know whether that's a misconception that actually degrades performance, and why.
I'm not the original person who suggested this but I lean
towards supporting this suggestion.
I too used to think that too large swap area doesn't hurt,
but the explenation I heard, which sounds reasonable to me
though I never got around to test it, is that "lots of swap
also means lots of book-keeping" -
the kernel takes more time to manage the free swap pages and
scan through them.
Of course if you reduce your swap to a level that your application
can't handle your data then it's a problem.
Cheers,
- Rog
Cheers,
--Amos
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html