This is a discussion on Re: [squid-users] To Have A /swap Partition, Or Not? - squid ; On Mon, 12 Apr 2004, Michael Gale wrote: > Making SWAP partitions twice your RAM is the old approache. If you read > any of the recent linux documents or mailing list you will find that it > is not ...
On Mon, 12 Apr 2004, Michael Gale wrote:
> Making SWAP partitions twice your RAM is the old approache. If you read
> any of the recent linux documents or mailing list you will find that it
> is not needed. Once a server has more then 1GB of RAM you will most
> likely not need to double all your swap space.
I have not looked into how 2.6 behaves yet, but Linux-2.4 and RedHat 2.4
kernels can end up in interesting corner cases resulting in out-of-memory
conditions when deep in swap unless the swap partition is sufficiently
large to contain all your applications, this regardless of how much or
little memory you have.
If there is no swap, or if the swap is sufficiently large then this
problem does not occur.
If there is swap and it is not sufficiently large to support the size of
all applications then memory pressure can result in a out-of-memory
condition even if the sum of memory + swap is way more than needed by the
applications. Normally this does not happen even if the system is
swapping, but when under memory pressure it may..
> I never create a swap space larger then 2GB regardless of how much the RAM gets.
Same here, if a swap is at all set up.
It is if very limited value to have a swap if you already have plenty of
memory (i.e. more than needed).
> Look at it this way -- for most people if your server has 1GB+ of RAM and your
> are using swap -- you most likely have a problem.