How to extend memory in UNIX?

Hi friends iam new to unix. how to extend memory in UNIx.

what are the possible scenarios to increase memory.

I just noticed we have swap memory also but when and how to use it. and what is the correct way to increase RAM. please provide information or some useful commands. Thanks

You will power off the server and add more memory in the slot in the physical world (bare metal)

In virtual enviroment things are easier if you have free memory on your machine of course.

On most of the virtual systems you can add memory dynamically while machine is running.
Solaris hypervisors it's a simple ldm set-mem <new increased value>
HPUX hypervisor it's a simple hpvmmodify ...
VMWARE configure 'hot memory' to be able to click it away!

That's adding. It will work without pain almost always.
On bare metal with caged resources such as zones, jails, dockers etc, it really depends of the implementation and of course if you have free memory on the machine.

Solaris implements rcapd with prtctl to increase without reboot of the non-global zone.
As for docker, i'm not really acquainted, but it looks like reboot is required.

Removing can be a bit trickier, and i in 99% of the time request a downtime.

As for SWAP, it a much broader subject and it is well, application and operating system specific.
You should follow guidelines mentioned in the specific documentation for your OS and/or applications for sizing the swap area.
Machines (apps, databases on it) that start to use swap instead of memory, will be much slower and less responsive due to using disk (which is much slower then memory).

1 Like

hi above commands are not workingin RHEL.