speed up system by changing swap to another USB drive? October 29, 2016 09:24PM |
Registered: 8 years ago Posts: 115 |
Re: speed up system by changing swap to another USB drive? October 30, 2016 01:40AM |
Registered: 10 years ago Posts: 226 |
dd if=/dev/zero of=/media/WD4TB/swapfile bs=1k count=1MMark the file as swap space:
mkswap /media/WD4TB/swapfileTest it:
swapon /media/WD4TB/swapfile swapon -sOutput of swapon -s:
Filename Type Size Used Priority /media/WD4TB/swapfile file 1048572 268180 -1To have it mounted at boot, add the following to the end of your /etc/fstab file:
/media/WD4TB/swapfile none swap sw 0 0Make sure you remove or comment out any other reference to a swap partition in fstab. Once you reboot, issue the swapon -s command again to ensure it's being used or check the output of dmesg:
dmesg | grep swap [ 40.376362] Adding 1048572k swap on /media/WD4TB/swapfile. Priority:-1 extents:9 across:1236992k FS
Re: speed up system by changing swap to another USB drive? October 30, 2016 02:31AM |
Registered: 10 years ago Posts: 66 |
Re: speed up system by changing swap to another USB drive? October 30, 2016 02:39AM |
Admin Registered: 13 years ago Posts: 18,896 |
zswap.enabled=1You will see a big difference with zswap in your use case.
Re: speed up system by changing swap to another USB drive? October 30, 2016 01:26PM |
Registered: 8 years ago Posts: 115 |
Re: speed up system by changing swap to another USB drive? October 30, 2016 01:28PM |
Registered: 8 years ago Posts: 115 |
Re: speed up system by changing swap to another USB drive? October 30, 2016 01:35PM |
Registered: 8 years ago Posts: 115 |
> zswap.enabled=1 >> You will see a big difference with zswap in your
Re: speed up system by changing swap to another USB drive? October 30, 2016 04:02PM |
Admin Registered: 13 years ago Posts: 18,896 |
swapoff -a swapon ....