Saturday, 7 April 2018

Tinkering with Swap space on Ubuntu 17.10

VMware Workstation made me do it :-)

Seriously, VMware was suggesting that I double my swap from 2 GB to 4 GB, so this is what I did: -

Report what's there

sudo swapon -s

Filename Type Size Used Priority
/swapfile                               file     2097148 0 -1


Turn the swap file off

sudo swapoff /swapfile 

Increase the space allocated to the swapfile

sudo fallocate -l 4G /swapfile

Initialise the swapfile

sudo mkswap /swapfile

mkswap: /swapfile: warning: wiping old swap signature.
Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
no label, UUID=9472dbc9-7575-491f-b00f-23c4ca30f22b


Turn the swap file on

sudo swapon /swapfile

Report what's there

sudo swapon -s

Filename Type Size Used Priority
/swapfile                               file            4194300 0       -1

With thanks to this: -


No comments: