Kyle <k...@attitia.com> writes:

> I've decided to increase the RAM on my home CentOS server. As best I
> can recall, the accepted wisdom is to have SWAP approx.~ 2 x RAM. Or
> was that approx.~ 50% of RAM?

As others have said, this was true back in the days when 64MB was a lot
of memory.  Now, by the time you are 8GB deep into swap you have spent
an awful lot of time thrashing...

> Can someone point me in the direction of an explicit tutorial on how I
> might go about increasing SWAP without destroying data on my other
> partitions please?

With fixed partitions, which you seem to use — although you didn't
specify the details — life is pretty hard.

Do you actually have some unpartitioned space?  If not, then forget
about repartitioning.  If you do, is it next to the existing swap
partitions or is it elsewhere?


Anyway, if you just want to add swap then swapping to a file is as
efficient, these days, as swapping to a raw device.[1]  Just use one of
them instead if repartitioning is hard.

> Or if I'm actually upping the RAM, should I just not worry about it?

I wouldn't bother.  Anyway, a couple of comments:

First, this would be vastly easier if you used LVM, since that makes
allocating space on the fly a universe easier.  Also:

> Info I'm guessing would be relevant;
>
> [k...@bottlenose ~]$ cat /etc/fstab
> /dev/md1                /                       ext3    defaults        1 1
> /dev/md2                /boot                   ext3    defaults        1 2

Are these RAID 0 or RAID 1?  If they are RAID 1 then this ...

> LABEL=SWAP-sdb2         swap                    swap    defaults        0 0
> LABEL=SWAP-sda2         swap                    swap    defaults        0 0

... means that your system will fail when a disk goes bad; you probably
want to match the RAID setup underneath your swap to the setup
underneath your data devices.

Regards,
        Daniel

Footnotes: 
[1]  Technically, since a raw device is only ever one extent and a file
     may be several it is a few hundred bytes more efficient, I suppose.

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to