Hi everyone, what’s the current recommendation for configuring openSUSE on an SSD? I have Tumbleweed on XFS with an SSD. Should I use the discard option in /etc/fstab? Or should I use a daily or weekly cron job for TRIM like Ubuntu does by default? Or something else? I read the wiki information ( https://en.opensuse.org/SDB:SSD_discard_(trim)_support ), but it looks really outdated. Thanks!
My understanding is that it really depends on your use.
On a laptop for general use I would choose a trim-on-boot approach.
On a server that seldom gets a reboot I would choose a cron job (and apparently the default BTRFS install does just that).
I think that the discard option is really needed for very high data-write setup, but I have no direct experience with that.
trim does slow things down a bit if used on each write (discard on the mount option) and thus if that is any concern should be done at boot or with a crone job
Thanks a lot for the replies, that makes sense. So how would I configure TRIM at boot?
Just append something like:
fstrim -v /
fstrim -v /home
to /etc/init.d/boot.local , one line for every partition you want to “trim” at reboot.
Perfect, thanks OrsoBruno!
The recommendation is to leave this to the system, and to treat SSDs as any HDD. If any of all the suggestions made on the web re. SSD usage and wearing is an improvement, the openSUSE ( read any distro ) devs would not hesitate and implement it as a default. My 2 cents. After 10 years of SSD experiences where I did exactly this.
knurpht:~ # mount | grep /dev/sd
/dev/sda5 on / type xfs (rw,noatime,attr2,discard,inode64,noquota) <=
/dev/sda6 on /Muzickx type xfs (rw,noatime,attr2,discard,inode64,noquota)
/dev/sdb1 on /home type ext4 (rw,noatime,discard,data=ordered)
/dev/sda4 on /srv type xfs (rw,noatime,attr2,discard,inode64,noquota)
As you can see the “discard” and “noatime” options are there, and they should since both sda and sdb are SSDs. In 10 years only one SSD died, the first I bought.
In general, openSUSE does a very good job here. Unless you know exactly what you’re doing, stick with the defaults.
Hmm, I agree that the “noatime” option makes a lot of sense for an SSD. But neither “noatime” nor “discard” are default openSUSE options.
They were when I added the second SSD, since I did not do anything to these values.
Confirming that, at least using EXT4 on a clean Leap install: no “discard” in my fstab and I added “noatime” myself.
Hi
See the following two SDB’s which should clarify most things;
SDB:SSD performance - openSUSE Wiki and SDB:SSD discard (trim) support - openSUSE Wiki
I have yet to touch any system running btrfs and xfs which take care of most things, never worried about discard these days. I have one ssd at over 25K hours and it’s still working fine… the two in this system are at 15K and almost 5K and my server at 11K hours, none show any signs of failure…