Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssd and 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
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Tue Jul 08, 2014 11:45 am    Post subject: ssd and trim Reply with quote

I Just bought my kingston 240GB SSD v300 to use with gentoo and I've been reading up on trim, I understand the importance of trim but I saw there are several ways to do that(-o discard, cron, anacron)
my number 1 goal being performance, 2 being ssd lifespan

which of these 3 methods would be best for me? are there any other alternatives?

thanks
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42847
Location: 56N 3W

PostPosted: Tue Jul 08, 2014 12:21 pm    Post subject: Reply with quote

blakdeath,

trim, however you choose to do it, has no effect on SSD lifespan as it does not change the number of writes the dive sees.
Instead, it tells the drive that the data in a given range of blocks can be erased.
SSDs need to be erased before they can be written because a 0 can be changed to a 1 by a write but not the other way round. Trim ensures that the erase happens when the data is no longer needed, rather than just before the write. Erase is a very slow operation, so trim keeps your SSD write speed good, even when the entire drive has been written.

There is a small downside, you don't get to recover accidentally deleted files.

To avoid building on SSD, you can put /var/tmp/portage on tmpfs. 2Gb is enough for most things. If you have the RAM for this, it makes very little speed diffence to builds as everything is in the disk cache anyway but it saves writes to disk.

I use -o discard because its easy to set up.

Code:
$ sudo smartctl -x /dev/sde
is worth keeping an eye on. It just said to me
smartctl -x /dev/sde:
==> WARNING: This drive may hang after 5184 hours of power-on time:
http://www.tomshardware.com/news/Crucial-m4-Firmware-BSOD,14544.html
See the following web pages for firmware updates:
http://www.crucial.com/support/firmware.aspx
http://www.micron.com/products/solid-state-storage/client-ssd#software

So I better flash my drive ... were it not for your post, I would not have looked
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Tue Jul 08, 2014 12:33 pm    Post subject: Reply with quote

Well thanks neddy, that clears things up, I'll use the discard option to proactively trim, Glad you figured that out before it was too late, but what do you mean by flash?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42847
Location: 56N 3W

PostPosted: Tue Jul 08, 2014 12:37 pm    Post subject: Reply with quote

blakdeath,

The SSD has its own computer system on board, well it will be a microcontroller of some sort.
Flash means to update the drive firmware, in much the same way as you can update a PC BIOS.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Tue Jul 08, 2014 1:05 pm    Post subject: Reply with quote

ok thanks :D
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