View previous topic :: View next topic |
Author |
Message |
JanErik Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 28 Oct 2002 Posts: 488 Location: Finland
|
Posted: Mon Jan 24, 2011 6:59 am Post subject: Swap on SSD, TRIM |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
s4e8 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 29 Jul 2006 Posts: 311
|
Posted: Mon Jan 24, 2011 7:16 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
JanErik Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 28 Oct 2002 Posts: 488 Location: Finland
|
Posted: Mon Jan 24, 2011 10:27 am Post subject: |
|
|
Is this also supported if the swap is encrypted with dm-crypt? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alextz n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Jan 2006 Posts: 62 Location: Romania
|
Posted: Sun Jun 12, 2011 10:42 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Moonboots Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 02 Dec 2006 Posts: 164
|
Posted: Mon Jun 13, 2011 5:31 am Post subject: |
|
|
Add "discard" to your swap entry in fstab |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|