Linux kernel 2.4 and later can handle multiple swap spaces up to 32 swap space, If you use multiple swap files and partitions and you want to prioritize which spaces are used first, you can do it by altering the priority no of swap files and partitions to boost the virtual memory. By default the priorities are assigned in the order that the swap spaces are added, where -1 is a higher priority number than -2.
First you need to deactivate the used swap partition or file in order to change the priority temporary.
[ root @ leolinux ~ ]# swapoff /dev/hda6
To change the priority -2 to 10
[ root @ leolinux ~ ]# swapon -p 10 /dev/hda6
To change the priority permanently run the follwoing steps.
[ root @ leolinux ~ ]# swapoff /dev/hda6
Edit /etc/fstab file.
[ root @ leolinux ~ ]# vim /etc/fstab
/dev/hda6 swap swap defaults,pri=10 0 0
ESC
:wq!