how to resize partition

General support questions including new installations
xmutan
Posts: 9
Joined: 2008/01/14 05:59:12
Location: Jakarta, Indonesia
Contact:

how to resize partition

Post by xmutan » 2008/08/12 19:35:57

hi, i'm using centos 5.2 with cpanel.

now i'm gonna increase my RAM from 4gb to 8gb.

currently my swap/ partition is 8gb, since i want to increase my ram to 8gb so i want to increase my swap/ partition to 16gb, the question is: how to do it? (i'm a linux noob)

Thanks

Evolution
Posts: 229
Joined: 2005/02/22 16:10:54
Location: Houston Texas
Contact:

Re: how to resize partition

Post by Evolution » 2008/08/12 19:48:08

There's really no point to having this much swap, unless you're running something like oracle. If you're using that much swap space, you need to upgrade your hardware.

The old mantra of swap = 2x RAM stops applying after you hit 1G of ram or so.

xmutan
Posts: 9
Joined: 2008/01/14 05:59:12
Location: Jakarta, Indonesia
Contact:

Re: how to resize partition

Post by xmutan » 2008/08/12 20:21:48

so even if i upgrade my ram from 4gb to 8gb, i needn't resize the swap/ partition?

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: how to resize partition

Post by toracat » 2008/08/12 21:10:39

[quote]
xmutan wrote:
so even if i upgrade my ram from 4gb to 8gb, i needn't resize the swap/ partition?[/quote]
That is correct. Under normal circumstances, it you see swap being used in the gigabyte range, that would indicate some kind of problem. Run the [b]df[/b] command and see for yourself how much swap space your system is currently using.

xmutan
Posts: 9
Joined: 2008/01/14 05:59:12
Location: Jakarta, Indonesia
Contact:

Re: how to resize partition

Post by xmutan » 2008/08/13 05:18:26

no /swap on df commands
only
[code]
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda6 14877060 414480 13694676 3% /
/dev/sda8 165514972 11889884 145081724 8% /home
/dev/sda5 14877060 190844 13918312 2% /tmp
/dev/sda3 49594228 2577156 44457116 6% /usr
/dev/sda2 49594228 5198116 41836156 12% /var
/dev/sdb1 148794916 15627004 125487640 12% /backup
/dev/sda1 194442 16194 168209 9% /boot
tmpfs 2074548 0 2074548 0% /dev/shm
[/code]

xmutan
Posts: 9
Joined: 2008/01/14 05:59:12
Location: Jakarta, Indonesia
Contact:

Re: how to resize partition

Post by xmutan » 2008/08/13 06:00:52

so what should i do? cause my site is forum using cpanel + vbulletin, getting slow when there is much traffic.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: how to resize partition

Post by toracat » 2008/08/13 08:01:22

I'm sorry, I meant [b]free[/b], not df.

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: how to resize partition

Post by AlanBartlett » 2008/08/13 12:31:41

[i]free[/i] with the [i]-mo[/i] flag will be the most useful, I think. :-)

The rule, regarding swap space, that I've always followed is:

If 0 <= RAM <= 1 GB; then SWAP size = 2 x RAM size
If 1 GB < RAM <= 2 GB; then SWAP size = RAM size
If 2 GB < RAM; then SWAP size = 2 GB.

Remember, it is now just as efficient to use a SWAP [b][i]file[/i][/b] (and easier to increase/decrease its size) rather than use SWAP [b][i]space[/i][/b].

stella
Posts: 1
Joined: 2008/09/01 06:20:55

Re: how to resize partition

Post by stella » 2008/09/01 07:16:13

I am not specialize in computer. Usually, I use a kind of partition software named [b][/b] Partition Manager which help me a lot when I need to resize the partition. You may have a try. http://www.[b][/b].html

[b]Edited by Moderator:[/b] No you're not a computer specialist, you're a filthy spammer who wont be tolerated here!

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: how to resize partition

Post by jlehtone » 2008/09/01 08:31:04

[quote]AlanJBartlett wrote:
Remember, it is now just as efficient to use a SWAP [b][i]file[/i][/b] (and easier to increase/decrease its size) rather than use SWAP [b][i]space[/i][/b].[/quote]
And one can have more than one swap volume, although that makes sense only if they are in separate physical disks. Since there seems to be space in sdb ...

Post Reply