[aklug] Re: swapping (was Re: What should I consider before doing an install? )

From: The Don Lachlan <aklug@unpopularminds.org>
Date: Thu Jul 07 2011 - 10:30:09 AKDT

On Tue, Jul 05, 2011 at 10:51:07AM -0800, Thomison, Lee wrote:
> My first reaction is that if your machine is doing much swapping at all
> the n you need more ram. RAM is cheap. Swap memory -really- slows things
> down (swap thrashing), and ideally is only used for 'medium term parking',
> rath er than active use. Even with 15K SAS, you still get a serious
> performance hit when swap starts being used for active use.

This is incorrect. Allocating more swap does not reduce your performance
(it'd be pretty silly if it did).

Paging TO swap is a Good Thing<tm>. Paging FROM swap is slow but should
happen rarely (if ever) and not significant in terms of system performance.
Paging TO and FROM swap simulataneously is a Bad Thing<tm> and an indication
that there isn't enough RAM or that something has run away with memory.

Calculating how much swap you need/want can be difficult as it depends what
you're trying to accomplish. If an application loads something into memory
and then doesn't touch it again, that's something the system would want to
page out to swap. The bigger the footprint, the more swap space you'd want.
If you're looking to hold crash dumps or hibernate systems, you'd allocate
swap for that.

I've run systems with gigs of swap without any performance issue. The
performance issues come from simultaneous bi-directional paging.

Scott,

To your question about using swap space in the VM host, for what are you
using the swap space? Each VM should have its own swap file and the host
shouldn't allocate swap space to the VM as if it were physical memory. As
such, I can't imagine why VirtualBox would use 5GB of swap space.

-L
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu Jul 7 10:30:30 2011

This archive was generated by hypermail 2.1.8 : Thu Jul 07 2011 - 10:30:31 AKDT