Jump to content

Arch -- useful user tips


abarbarian

Recommended Posts

discard option in fstab forces trim to be run for every write operation. This is inefficient and unnecessary, and causes faster degradation of the SSD. Using fstrim.service and timer is preferred.

@securitybreach so do you have discard in fstab and run the periodic trim?

  • Agree 1
Link to comment
Share on other sites

securitybreach
8 minutes ago, sunrat said:

discard option in fstab forces trim to be run for every write operation. This is inefficient and unnecessary, and causes faster degradation of the SSD. Using fstrim.service and timer is preferred.

@securitybreach so do you have discard in fstab and run the periodic trim?

 

Yup been doing it for over 8 years with my oldest ssd.

Link to comment
Share on other sites

abarbarian
13 hours ago, securitybreach said:

 

Yup been doing it for over 8 years with my oldest ssd.

 

I'm a tad baffled as to why you use two trim programs. Both are easily set up, though the systemd one is just a smidge easier.

 

As to ssd's wearing out for most of us we would probably never live long enough to wear one out no matter how hard we tried as we do not have that large a through put.Remember the post about the trial to run a set of ssd's to death, even the cheapest ones would have still been running long enough for your great grandchildren to use.

 

😎

Link to comment
Share on other sites

securitybreach
8 minutes ago, abarbarian said:

'm a tad baffled as to why you use two trim programs. Both are easily set up, though the systemd one is just a smidge easier.

 

Two? I just used TRIM by itself as it was suggested years ago when people worried about SSD write times.

Link to comment
Share on other sites

abarbarian
48 minutes ago, securitybreach said:

 

Two? I just used TRIM by itself as it was suggested years ago when people worried about SSD write times.

 

Well sunrat just asked

 

14 hours ago, sunrat said:

@securitybreach so do you have discard in fstab and run the periodic trim?

 

an you replied

 

14 hours ago, securitybreach said:

Yup been doing it for over 8 years with my oldest ssd.

 

So you said you were using both but now you are saying you only use one. So you can understand why I am puzzled 🤔

Link to comment
Share on other sites

securitybreach
1 minute ago, abarbarian said:

 

Well sunrat just asked

 

 

an you replied

 

 

So you said you were using both but now you are saying you only use one. So you can understand why I am puzzled 🤔

 

I never used FTRIM only TRIM.

Link to comment
Share on other sites

abarbarian
18 hours ago, securitybreach said:

Using the discard option for a mount in /etc/fstab enables continuous TRIM in device operations:

/dev/sda1  /           ext4  defaults,discard   0  1

 

Yeah you posted that you use the discard option, which does trim.

 

16 hours ago, securitybreach said:

It runs this executable:

 

You also posted this un-named systemd service which uses

 

16 hours ago, securitybreach said:

ExecStart=/usr/bin/fstrim --listed-in /etc/fstab:/proc/self/mountinfo --verbose --quiet-unsupported

 

So I am still baffled 🫣

Link to comment
Share on other sites

securitybreach
1 hour ago, abarbarian said:

 

Yeah you posted that you use the discard option, which does trim.

 

 

You also posted this un-named systemd service which uses

 

 

So I am still baffled 🫣

 

The service listed is the trim.service.   

Link to comment
Share on other sites

2 hours ago, securitybreach said:

 

The service listed is the trim.service.   

 

On my system it's called fstrim.service which fstrim.timer runs trim once a week ie. periodic trim.

discard runs trim constantly ie. continuous trim.

They do the same thing - run trim. You say you have both. Periodic trim is redundant if you have continuous trim, but periodic trim is default in most distros now so discard is not needed.

  • +1 1
Link to comment
Share on other sites

securitybreach

Well it looks like Arch made a change a while back where your trim service now runs ftrim. Whenever I initially set it up, it was running Trim not Ftrim

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...