Sunday 22 September 2013

Swap Space

A lot of you must be confused about what is this swap partition on your disk.And is it being used.
So today Lets learn about the swap space.

Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory.

Swap space can be a dedicated swap partition (recommended), a swap file, or a combination of swap partitions and swap files.
Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.
So, if:
M = Amount of RAM in GB, and S = Amount of swap in GB, then
If M < 2
 S = M *2
Else
 S = M + 2

Shrinking Disk Partition

1.If you want to shrink a disk partition simply go to Disk Management.You can do so by typing "Disk Management" in start up menu or by typing diskmgmt.msc in command prompt.

shrink1b.jpg


2.Right click on the partition you want to shrink and select "Shrink Volume".

3.A pop up window will appear. There you will see the maximum amount you can remove from the existing partition in "Size of available shrink space in MB" option .

shrink3b.jpg

4.In the "Enter the amount of space to shrink in MB" enter the amount of space you want to remove from the existing partition. Click on shrink button.

You will see an unallocated partition created after the previous partition with the size you specified.