Swap format help
closed
I recently bought a new Thinkpad E580. It is equipped with a 256gb SSD and a 1tb HDD.
I have Windows installed on the SSD and plan on installing Arch only on the HDD.
Currently my laptop has 8gb of RAM, but i want to upgrade to 16gb pretty soon.
Now my Question:
Where would you recommend me to setup my swap partition? On the SSD or better on the HDD?
Size would be probably 16gb in advance for when i have 16gb of RAM.
Edited 16 Dec 2018. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 3 · 100% up
- Kind
- Text
- ID
- a6furu
3 comments
I would put it on the SSD.
Check out how swap files work. Using a file might work for you and you might then like using a file better than a partition.
You don't have to set your partition to 16GB immediately. If you make sure you position the partition at the very end of the drive, you will be able to resize it easily with GParted in the future.
What might be interesting, you can try to hibernate with less swap than RAM. Linux tries to free up memory before hibernating. By default it tries to push memory usage down to 40% of your RAM size before starting to hibernate.
You might want to add the 'discard' mount option to the swap partition in your /etc/fstab. This will make the system send TRIM commands when freeing up swap. The SSD's controller will then see the partition as free space when there is no data saved inside it. This will kind of make the space not wasted because the SSD controller will be able to use it for its internal garbage collection job.
Thanks for the answer. I think i will go with the SDD then because I imagine it will work faster than the HDD.
Do you need hibernation? Because 16 gigs of swap is a lot. I personally run without swap at all.