I have two large swapfiles, each about 500 GB in size, and a program that is using about 900 GB of the total 1 TB of swap space. The memory-hungry program will take a few days to finish. However, I just realized that the swapfile priorities are incorrect. swapon
says:
NAME TYPE SIZE USED PRIO
/dev/sda partition 465,8G 465,8G -1
/home/alex/swapfile file 502,9G 384,5G -2
/home/alex/swapfile
is on an M.2 disk capable of 3.5 GB/s, whereas /dev/sda
is a SATA disk capable of only 540 MB/s. So, I want /home/alex/swapfile
to have priority -1
and /dev/sda
to have priority -2
, but I really don't want to interrupt the long-running process. Is there any way to change the swapfile priorities without first disabling the swapfile with swapoff
?