Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 14461  / 2 Years ago, mon, august 8, 2022, 10:59:19

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?


More From » laptop

 Answers
0

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.



Hibernate vs. Suspend


[#31073] Monday, August 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nnaisdio

Total Points: 369
Total Questions: 112
Total Answers: 108

Location: Kenya
Member since Mon, Jun 14, 2021
3 Years ago
;