You are not logged in.

#1 2023-02-28 23:52

sagsaw
Member
Registered: 2023-02-28
Posts: 22

[SOLVED] Check if TRIM is enabled

I have installed 32 bit tde q4os on ssd with xfs.

how to check if TRIM is enabled?

Last edited by sagsaw (2023-03-07 06:23)

Offline

#2 2023-03-01 09:33

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,501
Website

Re: [SOLVED] Check if TRIM is enabled

As Q4OS is essentially Debian, it should be the same as for 32bit Debian version.

Offline

#3 2023-03-02 19:01

crosscourt
Member
From: Wash DC
Registered: 2017-05-07
Posts: 1,872
Website

Re: [SOLVED] Check if TRIM is enabled

Debian by default supports auto trim.


Q4OS Aquarius 5.x KDE   Dell Inspiron 3670  i5 8600, GTX 1660 Super, 32gb, 2tb NVME SSD

Offline

#4 2023-03-06 09:20

sagsaw
Member
Registered: 2023-02-28
Posts: 22

Re: [SOLVED] Check if TRIM is enabled

ok is it enabled by default on install? did not see any entry discard or noatime in fstab

also did not see any cron job fstrim

Offline

#5 2023-03-06 11:39

sagsaw
Member
Registered: 2023-02-28
Posts: 22

Re: [SOLVED] Check if TRIM is enabled

Found a service called fstrim.service that runs weekly

It seems fstrim.service is enabled which periodically runs fstrim on mounted filesystems every Monday it seems at a specified time. But if machine is off then you miss it unless persistent=true is set in the fstrim.service

Last edited by sagsaw (2023-03-07 06:49)

Offline

#6 2023-03-07 07:35

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,333

Re: [SOLVED] Check if TRIM is enabled

The more correct way to do this is to create an override conf file.

sudo systemctl edit --full fstrim.timer

That will open fstrim.timer in nano. I like mine to run every day at startup.

[Unit]
Description=Discard unused blocks daily
Documentation=man:fstrim

[Timer]
OnCalendar=daily
AccuracySec=1h
Persistent=true

[Install]
WantedBy=timers.target

Ctrl O will save that to /etc/systemd/system/.#fstrim.timernnnnnxxxxx
Ctrl X to exit.

Editing the service files and timer files direct is a bad idea because these can get replaced during updates. The override file will not be affected by any changes to the originals.

As regards noatime - this is my fstab if it helps

UUID=088038b4-cea2-4b6b-b02d-ee11bd9b850a /              ext4    defaults,noatime 0 1
UUID=d1d4455c-269f-4859-92d9-8c8936bff04c swap           swap    defaults,noatime 0 2
UUID=b45e6d58-80ae-4fba-9cee-8a95c69952af /home          ext4    defaults,noatime 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

Last edited by bin (2023-03-07 07:37)

Offline

#7 2023-03-07 08:03

sagsaw
Member
Registered: 2023-02-28
Posts: 22

Re: [SOLVED] Check if TRIM is enabled

ok thanks. I read somewhere that once a week running fstrim is recommended for longer ssd life especially if not much is being deleted and rewritten daily.

Also read that using discard in fstab is not recommended as again it will cause too much ssd writes everytime something is deleted.

Offline

#8 2023-03-07 12:23

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,333

Re: [SOLVED] Check if TRIM is enabled

Well if it's any help I'm still running an Intel SSD from 2010 with this arrangement. OK it's getting to the end of its useful life but still going strong. Agreed discard is a bad idea - that's why I use noatime instead. I prefer fstrim daily as I do d/l and erase a fair number of distro iso files for testing and if left too long it then takes an age to run.

Offline

Board footer

Powered by FluxBB