Hi all,
I am running OpenSUSE off an SSD (a 120Gb Samsung Evo 840). I have the root on the SSD, while my /home is on a bigger mechanical disk.
Root is BTRFS while /home is XFS.
I am trying to understand what are the best policies to follow to take care of my SSD (and keep it running for as long as possible). I read a lot of posts on this forums and here is what I’m coming up with.
This is what I’m already doing:
I scheduled a daily TRIM job that runs the fstrim command
This is what I’m thinking to do:
I see that BTRFS mount options already include “ssd”, but I think it would also be better to change realtime to noatime and add nodiratime
I presently have /tmp on the SSD (it is a subvolume of root); I’m thinking about moving it to another disk
I’m thinking about doing the same with /var/tmp
What do you think about 1), 2) and 3)? Should I proceed?
Is there something I should take care of when implementing step 2) and 3)?
Is there something else you would do to avoid tearing of the SSD?
Hi all,
I am running OpenSUSE off an SSD (a 120Gb Samsung Evo 840). I have the
root on the SSD, while my /home is on a bigger mechanical disk.
Root is BTRFS while /home is XFS.
I am trying to understand what are the best policies to follow to take
care of my SSD (and keep it running for as long as possible). I read a
lot of posts on this forums and here is what I’m coming up with.
This is what I’m already doing:
I scheduled a daily TRIM job that runs the fstrim command
This is what I’m thinking to do:
I see that BTRFS mount options already include “ssd”, but I think it
would also be better to change realtime to noatime and add nodiratime
I presently have /tmp on the SSD (it is a subvolume of root); I’m
thinking about moving it to another disk
I’m thinking about doing the same with /var/tmp
What do you think about 1), 2) and 3)? Should I proceed?
Is there something I should take care of when implementing step 2) and
3)?
Is there something else you would do to avoid tearing of the SSD?
Thank you in advance.
Cris
Hi
You shouldn’t need a trim job, this is already taken care of by the
system (well on Leap anyway) via a softlink in cron.
Never worried about tmp or anything else, it’s a disk it’s meant to be
used… plus since your running Tumbleweed your writing to the SSD
will be above an average openSUSE install…
–
Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 | GNOME 3.10.1 | 3.12.51-52.31-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
I only see btrfs scrub and btrfs balance being run here by cron. Nothing regarding trim.
](https://en.opensuse.org/SDB:SSD_performance)
Thank you! This is very valuable information. However, the article is quite outdated and most of the things said there are already taken care of by the standard Tumbleweed installation (e.g. I see that tumbleweed automatically selected “deadline” as the scheduler for the SSD).
This is very good news however.
Well, that’s not what is written on the article that you pointed me to. It explicitly recommends putting temp data on a TMPFS.
However, that makes me wonder about Tumbleweed’s policy about cleaning the /tmp directory. The article says that OpenSUSE will wipe it at every boot, but that’s not what I’m seeing. Actually, today I can see files dated 23-11-2015 in my /tmp.
Do you know how often (if at all) is /tmp supposed to be cleaned on Tumbleweed? I do not find a cron job for that and /etc/tmpfiles.d is empty.
I don’t have that symlink here (btrfs-trim.sh).
I was about to create it, but then I found a note in /etc/sysconfig/btrfsmaintenance (red and underlined by me):
## Path: System/File systems/btrfs
## Description: Configuration for periodic fstrim
## Type: string(none,daily,weekly,monthly)
## Default: "none"
## ServiceRestart: btrfsmaintenance-refresh
#
# Frequency of periodic trim. Off by default so it does not collide with
# fstrim.timer . If you do not use the timer, turn it on here. The recommended
# period is 'weekly'.
BTRFS_TRIM_PERIOD="none"
So I did a little research on fstrim.timer. I discovered that, on Tumbleweed, there was a recent (snapshot 20151214) change regarding this:
==== systemd-presets-branding-openSUSE ====
- Enable fstrim.timer and disable fstrim.service. TRIM should be
performed once a week and not on every boot (FATE#317727).
http://www.spinics.net/lists/util-linux-ng/msg09133.html
So I decided to enable the timer and start it, with the following two commands:
I can modify them, but they’re both outdated: they don’t deal with Leap nor Tumbleweed. The most recent openSUSE release to be dealt with is 11.4.
I’m not sure how I should proceed.