[Gllug] Swap Restrictions

Christian Smith csmith at micromuse.com
Tue Apr 18 14:16:16 UTC 2006

On Wed, 12 Apr 2006, Steve Nelson wrote:

>Hello All,
>Finally, I have just built another two machines, both with 8G of RAM.
>The client requested 16G of swap(!).  There weren't enough partitions
>to make 8 x 2G partitions, and surely this is overkill anyway, even
>for a very very busy Oracle server?  I created 3 x 2G.  Just wondered
>what we think about such large swap partitions, and how they should be
>created?  More extended partitions and multiples of 2G?

Ask why they want 16G of swap. If it's the old 2x RAM rule, then they are
about two decades out of date.

If they are epecting to use more than 8G of RAM, then I'd recommend they
spend the money on that extra RAM instead of admin time on swap.

If an Oracle server is having memory paged out to swap and discarded, then
that is defeating the Oracle caching.

The swap file is used in Linux (and Solaris, and HP-UX, and AIX ...) for
anonymous data only. As such, only anonymous data like heaps, stacks and
shared memory segments will compete for swap, and if you have an anonymous
memory usage of anywhere near 2x RAM, then your machine is too overloaded.

Linux will write memory to swap speculatively in order to be able to
discard anonymous memory with no delay should it need to. If the server is
properly sized, then a nominal amount of swap should be sufficient. Just
give the servers a single 2G swap partition.


     X                           - AGAINST MS ATTACHMENTS
    / \
Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list