Hallo k357k9 :-)
Well, given what we just found out, I'd say things are actually fairly easy. The OS takes care of trim and nothing else needs to be done. I don't know if this is the case for all Linux distributions or not, but now that I know what to look for it's easy to find out.
I just ran a systemctl status on my Ubuntu 18.04 server and Trim is active as well.
Case closed :-)
Announcement
Collapse
No announcement yet.
Brand New SSD
Collapse
This topic is closed.
X
X
-
Danke Thomass00.
I don't think you are the only one.
What a mess this whole SSD trim thing is.
- Top
- Bottom
Leave a comment:
-
Originally posted by k357k9 View PostThanks whitepine.
Here is what I get --
Code:dean@mx:/etc $ systemctl status fstrim.timer Failed to get properties: No such interface ''
- Top
- Bottom
Leave a comment:
-
It does appear that one thing Linux distros agree on is a once per week trim. The only question is if it has been enabled automatically and
what method was used. whitepine said his 18.04 already was enabled. It looks like my 18.10 in VB is also ready to go. Do you agree?
- Top
- Bottom
Leave a comment:
-
IMO, FWIR, doing a fstrim more than once a week on an ssd eats up the lifetime of the device. Cheaper & poorer quality devices are affected more negatively by frequent fstrim's than better made devices.
First, just reading data from an SSD does not wear it out. Only writing and deleting affect its lifetime. Based on the bits per cell, SLC store just one bit, MLC store two bits and TLC store three bits per cell. A typical MLC can survive 3,000 writes. That doesn't seem like much but those writes are spread across the SSD, i.e., "leveling the wear". Combine that with the reserve cells which are called into service when a cell dies, and you can understand why good quality SSD's are guaranteed for 5 to 10 years. Formuleas for calculating lifetimes of SSD's show hundreds of years!
Here is the calculation for the SSD I have, a Samsung 850 Pro:
I'm 77. My Acer is 6 years old. Both the Acer and the SSD will outlive me even if I live to my dad's age: 94. But, I doubt that the two Toshiba 750Gb HD's will last that long.
- Top
- Bottom
Leave a comment:
-
Thanks GreyGeek.
This whole SSD, trim, and cron thing is a real mess. The more I read and watch, the more confused I get.
Even the writers and video makers say it is a confused issue. The advice from a couple of years ago seems invalid now.
I think I will go with if it already works, don't fix it.
- Top
- Bottom
Leave a comment:
-
Here is a link to an explanation of the terms in the crontab file BUT, it does not give the correct way to edit the /etc/crontab file. Do not edit that file directly.
https://hostadvice.com/how-to/how-to...-ubuntu-18-04/
In a Konsole issue
sudo crontab -e
That will set up a tmp file which, when you save and close the editor, will update a secondary user crontab file. You won't see anything you've added in /etc/crontab. User created crontab files are in /var/spool
https://alvinalexander.com/linux/uni...editor-example
As far is fstrim is concerned, Bionic has a preconfigured systemd timer service active, so you don't need to do anything, unless you want it to do trims more often than once a week. More often than once a week is not advisable for ssd's.Last edited by GreyGeek; Oct 19, 2018, 12:59 PM.
- Top
- Bottom
Leave a comment:
-
Thanks v7peer.
The problem was I ran the command in the host and not VB.
I get the same thing you do now.
Is there a way to make sure this is really working?
- Top
- Bottom
Leave a comment:
-
In 18.04 the fstrim is carried on weekly by default. I did not add fstrim to cron or sytemctl when I installed 18.04. Nor did I create a script.
When I gave the command systemctl status fstrim.time I get the same result as whitepine.
- Top
- Bottom
Leave a comment:
-
Thanks whitepine.
Here is what I get --
Code:dean@mx:/etc $ systemctl status fstrim.timer Failed to get properties: No such interface ''
- Top
- Bottom
Leave a comment:
-
Thanks GreyGeek.
Is this going to work as /etc/cron.weekly/trim-ssd?
.Code:#!/bin/bash #this script is applied to SSE drives for sustained long-term performance and wear-leveling LOG=/var/log/trim.log echo "*** $(date -R) ***" >> $LOG fstrim --all --verbose >> $LOG
- Top
- Bottom
Leave a comment:
-
I believe fstrim is no longer run as a cron job, but as a systemctl job. On my 18.04 machine when I run systemctl status fstrim.timer I get:
Code:randy@hal:/etc$ systemctl status fstrim.timer ● fstrim.timer - Discard unused blocks once a week Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled) Active: active (waiting) since Thu 2018-10-18 08:19:57 EDT; 14h ago Trigger: Mon 2018-10-22 00:00:00 EDT; 3 days left Docs: man:fstrim Oct 18 08:19:57 hal systemd[1]: Started Discard unused blocks once a week.
- Top
- Bottom
Leave a comment:
-
No software changes. Make fstrim a cron job for once a week.
- Top
- Bottom
Leave a comment:
-
Brand New SSD
Do I need to make any software changes for my new WD Blue SSD?
What about running fstrim?
Is there anything I need to watch out for?Tags: None
- Top
- Bottom
Leave a comment: