Change Priority of SWAP files in Linux

You can check the current priority of the swap file from /proc/swaps.

$ cat /proc/swaps

In order to change the priority of the swap partitions, you need to edit the “fstab” and append the new priority. If you have the fstab entry for your swap file /swap1 as:

/swap1 swap swap defaults 0 0 

then append the following:

/swap1 swap swap pri=x,defaults 0 0 
where x is the new priority you have set.

You can re-mount it by using the ‘mount -a’ command.

Take Control of Your Hosting with Windows VPS

Gain complete control over your server environment. Customize, configure, and manage your Windows VPS to meet your exact needs.

Scroll to Top