[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: nvme SSD and poor performance



Christian Britz writes:

On 17.08.21 at 15:30 Linux-Fan wrote:
Pierre Willaime writes:

P-S: If triming it is needed for ssd, why debian do not trim by default?

Detecting reliably if the current system has SSDs that would benefit from trimming AND that the user has not taken their own measures is difficult. I guess this might be the reason for there not being an automatism, but you can enable the systemd timer suggested above with a single command.

I am pretty sure that I have never played with fstrim.timer and this is the output of "systemctl status fstrim.timer" on my bullseye system:

● fstrim.timer - Discard unused blocks once a week
     Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
     Active: active (waiting) since Tue 2021-08-17 14:10:17 CEST; 3h 5min ago
    Trigger: Mon 2021-08-23 01:01:39 CEST; 5 days left
   Triggers: ● fstrim.service
       Docs: man:fstrim

So it seems this weekly schedule is enabled by default on bullseye.

Nice, thanks for sharing :)

BTW, if my system is not online at that time, will it be triggered on next boot?

Yes, I would think so.

A systemd timer can be configured to run if its schedule is missed by `[Timer] Persistent=true` which on my machine is configured for `fstrim.timer` (check `systemctl cat fstrim.timer`).

See also: https://jeetblogs.org/post/scheduling-jobs-cron-anacron-systemd/

Of course, it is also possible to find out experimentally. Check
`systemctl list-timers` to find out about all registered timers and when they ran last.

HTH
Linux-Fan

öö

Attachment: pgpWkOJ2XnDqs.pgp
Description: PGP signature


Reply to: