[CentOS] Swap Considerations

Tue Feb 27 06:58:40 UTC 2007
DamianS <dsteward at internode.on.net>

On Tue, 2007-02-27 at 07:36 +0200, Alvin Chang wrote:
> On 27/02/07, Feizhou <feizhou at graffiti.net> wrote:
> > When I get firefox and thunderbird fired up, memory usage can go through
> > the roof so I have allocated 2GB (maximum swap partition size btw) for
> Pardon me, but I just set up a CentOS box with 8GB of swap partition
> yesterday. Am I misisng something?

Not really. 2GB is (or was) the maximum _safe_ swap partition size.
However, I have a system with a 4GB swap part and one with a 3GB swap
running CentOS, and they both run fine.

I have heard however, that smaller-sized swap partitions are faster/more
efficient. ie. 3x1 GB swap partitions are 'supposed to be' better than 1
x 3 GB partition.
So when I'm building new systems, I create a number of 1 GB swap
partitions depending upon predicted load, and give them differing
priorities.

I've theorized (but never bothered to do some benchmarking or to put
into practice) that optimum swap strategy may be to have varying sizes
eg. 512 MB with highest priority, then 1 GB, 2 GB and 4GB with lowest
priority.
But I think that would be 'gilding the lily', for just a 'theoretical'
increase in eficiency, as opposed to making a practical difference.