Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Swap on SSD, TRIM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
JanErik
Guru
Guru


Joined: 28 Oct 2002
Posts: 488
Location: Finland

PostPosted: Mon Jan 24, 2011 6:59 am    Post subject: Swap on SSD, TRIM Reply with quote

I just ordered an SSD and will put my / and /home on it.
Now I am wondering what to do with the swap, I am not worried about the drive wear, it will be a museum piece anyway before it wears out, but the TRIM functionality and performance impact.
If I put the swap as a partition, that will not be able to use TRIM, right? If I understand correctly, it would have to be made as a swap file on the ext4 partition, then it would utilize the TRIM - but is it only if the swap file is deleted? How about when a file is constantly changed?
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Mon Jan 24, 2011 7:16 am    Post subject: Reply with quote

The first TRIM support in kernel is swap partition. The Adding swap dmesg will show flag "SS" if swap partition in SSD w/o TRIM, show "SSD" if w/ TRIM.
Back to top
View user's profile Send private message
JanErik
Guru
Guru


Joined: 28 Oct 2002
Posts: 488
Location: Finland

PostPosted: Mon Jan 24, 2011 10:27 am    Post subject: Reply with quote

Is this also supported if the swap is encrypted with dm-crypt?
Back to top
View user's profile Send private message
alextz
n00b
n00b


Joined: 04 Jan 2006
Posts: 62
Location: Romania

PostPosted: Sun Jun 12, 2011 10:42 am    Post subject: Reply with quote

Is there a flag which I should pass in /etc/fstab to enable TRIM on swap.

I have a swap partition on an SSD with TRIM but it shows SS.
Back to top
View user's profile Send private message
Moonboots
Apprentice
Apprentice


Joined: 02 Dec 2006
Posts: 164

PostPosted: Mon Jun 13, 2011 5:31 am    Post subject: Reply with quote

Add "discard" to your swap entry in fstab
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum