For a desktop installation in a new and shiny laptop (let's say 16gb ram and ssd hd), does it make sense to have a swap partition?
For a desktop installation in a new and shiny laptop (let's say 16gb ram and ssd hd), does it make sense to have a swap partition?
Yes you need swap, if you just use it for suspend and minor swap actions a swap file somewhere on your disk might be fine, And i been using swap file from almost a year never ever had problem with it, just don't like partitioning the disk.
Just copy paste the following line in terminal and it will create 2 GB of swap. First become root:
sudo su
Then copy and paste pate the following (as always, make sure you understand what you are pasting on your terminal):
mkdir /swap &&
cd /swap &&
fallocate -l 2g 2GB.swap &&
mkswap 2GB.swap &&
swapon 2GB.swap &&
echo "# # # Swap File # # #" >> /etc/fstab &&
echo "/swap/2GB.swap none swap sw 0 0" >> /etc/fstab &&
mount -a
Swap (partition vs file) for performance
Down Side
You cannot hibernate to swap file, as mentioned by @Takkat, I have check and i have 1st time in my life try to hibernate but its not working, so if you want to hibernate yo need swap partition, otherwise if swap file is good to go.