This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

For those of you using SSD's - TRIM support..

I added the following lines to my /etc/crontab to run SSD TRIM cleanup on the primary mount points in my UTM weekly.  The fstrim command is included with the OS and does not appear to run automatically from what I could tell.  If someone know better, let me know..

@weekly  root /sbin/fstrim /
@weekly root /sbin/fstrim /boot
@weekly root  /sbin/fstrim /opt/inst
@weekly root /sbin/fstrim /var/log
@weekly root /sbin/fstrim /tmp

Thought I'd share..

Bryan


This thread was automatically locked due to age.
  • You might find your crontab entries are gone.  /etc/crontab appears to be regenerated every ~5 minutes.

    Creating /etc/crontab.local (or another new crontab.* name) with the desired entries should get them spun into the frequently regenerated /etc/crontab.

    (Based on 9.1)
  • Good call, fortunately the entries are still there nearly 5 hours later.. hopefully they wont get whacked.. I was being lazy I admit..
  • With proper wear leveling and garbage collection a decent SSD shouldn't need you to issue a TRIM command.  TRIM commands aren't free either, they can cause an SSD to tank in performance while it does runs the TRIM command.  Background garbage collection should work just fine on a good SSD for non desktop scenarios.

    If you have a low quality SSD that needs weekly TRIM commands, it is probably a bad choice in a device that is frequently writing small chunks of data anyways.
  • Apple enables TRIM on all of their SSD's and I'm quite certain they aren't low quality.. I'd also expect any degradation that may or may not occur would still leave one with a very low power drive that would still outperform spinning disk.
  • Apple doesn't enable TRIM for non Apple SSDs, so make of that what you will.  Still, not the same OS, not the same usage model.  The key here is that this isn't a desktop usage model.

    Linux has trouble with TRIM, and can slow down when TRIM is active on the filesystem.  TRIM commands sent via fstrim can have the same impact, but as long as you don't have any problems when the cron job runs you should be fine.