Jump to content
XPEnology Community

Disabling swap


rufik

Recommended Posts

It's probably possible to disable swap (and it is certainly possible to omit slow drives from swap I/O by modifying the RAID1 array to use the slow drives as hotspares) but the swap space will always be reserved on every disk that is initialized for use with DSM (partition 1).

 

So, if your objective is to recover the space, that is not possible.  If your goal is to speed up the swap access and you have certain drives that are better able to handle the I/O, see this: https://xpenology.com/forum/topic/12391-nvme-optimization-baremetal-to-esxi-report

Link to comment
Share on other sites

  • 2 years later...
On 4/23/2021 at 9:47 AM, rufik said:

I only want to omit swap usage on slow hdd (/dev/md1), no space reclamation. I can easily disable it manually (swapoff as root) but how to prevent DSM from use it again after reboot?

 

Sorry for digging out old post, but I am also looking for this since I have terrible QD and latency on my md1 (swap) partition. Have you managed to archive that?

Link to comment
Share on other sites

  • 2 weeks later...

So I enabled swapfile on a different volume with higher priority instead.

Make sure swapfile priority is higher than of other swaps.

Configure swapfile setup on system boot.

 

$ sudo truncate -s 2G /volumeX/swapfile
$ sudo mkswap /volumeX/swapfile
$ sudo swapon -p 9 /volumeX/swapfile
$ swapon --show

 

Edited by f2cal6fg
typo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...