LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   change memory size without re-install the os ! (https://www.linuxquestions.org/questions/linux-newbie-8/change-memory-size-without-re-install-the-os-705783/)

shipon_97 02-18-2009 10:58 PM

change memory size without re-install the os !
 
Friends ,

Is it possible to change the memory size while the linux server is running ?

Actually , I need to decrease the swap size and also increase the physical memory size . Without formatting can I do it ? I m using RHEL 5 linux server .

Waiting for quick reply ... ...

lazlow 02-18-2009 11:21 PM

Ok, in order to add more memory(ram) you have to shut the machine down, there is no way around this.

You can reduce the size of swap by, unmounting swap, use gparted to shrink size of swap, and remount swap.


The more important question is why you want to reduce the size of the swap? Reducing the size of the swap will not make you machine run any faster.

Edit: Either way you do not need to reinstall the OS.

frieza 02-19-2009 12:14 AM

actually shouldnt the swap partition be the same size as physical ram? or is that concept outdated?

lazlow 02-19-2009 12:18 AM

The old rule used to be twice the swap as you have physical ram. The arguments about swap are about the same as the Gnome VS Kde in that there is no "absolute" answer. It all depends on what you doing and how the apps that you are doing it with were designed.

syg00 02-19-2009 12:40 AM

Quote:

Originally Posted by lazlow (Post 3449096)
Ok, in order to add more memory(ram) you have to shut the machine down, there is no way around this.

Weeelll ... actually the kernel does support memory hotplugging. Both adding and removing.
The likelihood of the OP having the appropriate hardware and kernel level is probably very slim.

As mentioned, resizing swap is generally pretty painless.


All times are GMT -5. The time now is 02:42 PM.