enlight-cloud-hosting

While increasing Swap File on the Server, first you need to check there should be enough free space (larger than new swap size) available on the partition.

Follow the below steps:

Step 1:- #dd if=/dev/zero of=/swapfile bs=1024 count=1572864

This command is for creating the free space for file /swapfile to 1.5 GB

Please note that count is the block size calculated as (1024 * 1.5)

Step 2:- #mkswap /swapfile

Step 3:- #chown root:root /swapfile

Step 4:- #chmod 0600 /swapfile1

Step 5:- #swapon /swapfile1

Step 6:- #vi /etc/fstab

Enter this at the end of file "/swapfile1 swap swap defaults 0 0"

Step 7:- # mount -a or

Step 8:- free -m (check swap file size for your confirmation)

Step 9:- This has been done Cheers !!!

Incoming searches related to how to increase swap file size in linux

  • change swap file size linux
  • linux swap file size ubuntu
  • swap partition size linux

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

What is Virtuozzo? Some Details About Virtuozzo.

Virtuozzo is a VPS hosting technology made by SWsoft. It permits us to build various…

Guide to Managing FTP Accounts in Plesk

This guide illustrates how to manage FTP accounts in Plesk. It allows you to control…

How to Create Symbolic Soft Link in Linux using ln Command

How to Create Symbolic Soft Link in Linux using ln Command

A symbolic link (also called a soft link or symlink) is a special file that…