how to resize partition
how to resize partition
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
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
Re: how to resize partition
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.
The old mantra of swap = 2x RAM stops applying after you hit 1G of ram or so.
Re: how to resize partition
so even if i upgrade my ram from 4gb to 8gb, i needn't resize the swap/ partition?
Re: how to resize partition
[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 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.
Re: how to resize partition
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]
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]
Re: how to resize partition
so what should i do? cause my site is forum using cpanel + vbulletin, getting slow when there is much traffic.
Re: how to resize partition
I'm sorry, I meant [b]free[/b], not df.
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: how to resize partition
[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].
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].
Re: how to resize partition
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!
[b]Edited by Moderator:[/b] No you're not a computer specialist, you're a filthy spammer who wont be tolerated here!
Re: how to resize partition
[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 ...
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 ...