Skip to content

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.

3 points3 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
3 · 100% up
Kind
Text
ID
a6furu

Author

11
posts
30
comments
1
media
View profile

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.

3 points

Thanks for the answer. I think i will go with the SDD then because I imagine it will work faster than the HDD.

​

1 points

Do you need hibernation? Because 16 gigs of swap is a lot. I personally run without swap at all.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.