Edubuntu/Ubuntu and SSD trim?

Status
Not open for further replies.
Joined
Jun 24, 2004
Messages
14,505
Location
Top of Virginia
I'm installing Edubuntu LTS 14.04 on one of my older laptops. I've read that trim is enabled by default for Intel and Samsung SSDs. No good for me -- I have a Samsung SSD, but not in this machine. This machine has a generic brand 120 GB M.2 card mounted in a SATA adapter cradle to fit a standard 2.5" laptop drive bay. It was good to go with Windows -- Windows recognized it as an SSD and presumably took care of it.

Is there any truth to the fact that Ubuntu trims Intel and SSD drives only? If so (or even if not), is there anything I need to do to this installation once it's finished? I guess the biggest things with a Windows installation is to ensure that the scheduled defrag is NOT enabled, so you don't defrag the SSD. With Ubuntu, that's not a factor. But I'd still like to know if there's anything I need to do to this.

Various posts on sites like Tomshardware talk about running a weekly automated chron script or something like that. But there doesn't seem to be much consensus on what is the right thing to do. I know a lot of you guys will know the "real" answer.
smile.gif


Thanks.
 
Try a manual trim first:

sudo fstrim -v /

This will take several seconds, during which the drive light will probably be on constantly. When complete it will report the number of bytes trimmed, which will be the entire free space on the partition the first time you do it.

Then repeat the command. This time it should be few or no bytes trimmed.

If that works you should put it in chron as a daily schedule. There is no harm in over-trimming other than that it makes the drive 100% busy during the process.
 
Last edited:
Thx. The first time I ran it, I think the entire disk got trimmed (108 GB of something like 114 GB total). The second time, it trimmed about 86 MB. The third time, it trimmed about 24 MB. I will look at putting it in chron as a daily or weekly thing.
 
Status
Not open for further replies.
Back
Top