Presently my RAM is 2GB. I heard that in linux we can get extra memory to RAM from the harddisk by using swap partition. What is the procedure for that?
here in the pics i'm giving my system info.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
In a default Ubuntu installation you will always have a swap partition which will be created by the installer. In your setup it is the partition
/sda5 but this location may change from system to system.
This partition will obviously not be able to increase the physical RAM but it is storage memory on your hard disk reserved for the kernel to use whenever we run short of physical RAM. This may never happen on a system with 2 GB of RAM unless we perform very memory demanding tasks (e.g. video processing, huge image processing) or have many applications running simultaneously.
Note that memory usage on swap is extremely slow, so we do not really want to have that other than in emergency situations.
In case you need a larger swap you can do so after installation either by creating a larger swap partition:
or by adding a swap on a file (which can not be used for hibernation):
More about swap can also be found here:
You've piece of (hardware) RAM of 2GB and you can't 'create' more RAM with software. But I think I know what you've heard of.
When the system requires more memory than is physically available, the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately.
So when you have a SWAP space that is twice as big as your memory (in your case a swap space of 4 GB) your system will be able to putt the entire memory on swap space, and read the other 2 GB in on the memory. In other words, it is able to swap the entire content of your memory with the 2GB data on the swap disk.