How to create swap partition / space

1

Swap space in Linux is utilized when the usage of physical memory (RAM) is full. When the physical memory is full and if the resources needs more memory then the inactive pages in memory are moved to the swap space. Swap space is not a substitution of RAM, it can help the server little amount when the RAM is fully utilized.

To see existing swap partitions and swap size. As per below output, current swap partition size is 2 GB.

# swapon -s
Filename Type Size Used Priority
/dev/mapper/VolGroup00-LogVol01 partition 2064376 0 -1

[root@ramesh ~]# free -m
total used free shared buffers cached
Mem: 1002 377 624 0 55 200
-/+ buffers/cache: 121 880
Swap: 2015 0 2015

We are going to increase the swap space to another 1 GB and this can be done in 3 ways.

1. From raw disk
2. Swap file
3. LVM

Recommended For You

About the Author: admin

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter
Subscribe to our email newsletter today to receive updates on the latest news, tutorials and special offers!
No Thanks
Thanks for signing up. You must confirm your email address before we can send you. Please check your email and follow the instructions.
We respect your privacy. Your information is safe and will never be shared.
Don't miss out. Subscribe today.
×
×
WordPress Popup Plugin