Jump to content

Recommended Posts

Posted

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
securitybreach
Posted
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.

Posted
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.

 

😎

securitybreach
Posted
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.

Posted
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 🤔

securitybreach
Posted
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.

Posted
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 🫣

securitybreach
Posted
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.   

Posted
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
securitybreach
Posted

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

 

  • 1 year later...
abarbarian
Posted (edited)

A very neat way to get important Arch update news !! 

 

I found this neat bash function  whilst conducting Window Maker guerilla promoting at reddit. I installed it  and it works really well an I think it is pretty darn neat an dead simple to implement. Proper KISS stuff. 😋

 

https://www.reddit.com/r/archlinux/comments/1ljpqf5/comment/mzltvox/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

 

For updating, I have an alias in my bashrc that looks something like this: 

 

alias  pacu="news; pacaur -Syu"

 

That "news" command in the alias is a small script that prints Arch latest news.
Some parts of that output are brightly colored to make it easy to notice that there's very new news entries.

 That "news" command is this function in my .bashrc.

 

news() {
echo $'\e[0;34m:: \e[1;37mArch Linux News:\e[m'
perl << 'EOF'
use Date::Parse;
$_ = qx{curl -s "https://archlinux.org/feeds/news/"};**
for (m{<item>(.*?)</item>}sg) {
($t) = m{<title>(.*?)</title>};
($d) = m{<pubDate>(.*?)</pubDate>};
$t =~ s/&amp;/&/g;
$t =~ s/&lt;/</g;
$t =~ s/&gt;/>/g;
$d = (time - str2time($d)) / (60 * 60 * 24);
if ($d < 7.5) {
$c = "\e[0;30;41m X \e[1;31;40m";
} elsif ($d < 14.5) {
$c = "\e[0;30;43m X \e[1;33;40m";
} else {
$c = "   ";
}
print $c, sprintf("%6.1f", $d), " days ago\e[m | ", $t, "\n";
last if ++$n == 5;
}
EOF
}

 

QRz7wBX.png

 

Edited by abarbarian
abarbarian
securitybreach
Posted

I definitely would advise against adding pacman hooks from AUR packages, especially ones that are not popular (very low votes). The highest one only has 9 votes and most have 1 vote. It doesnt happen much but there have been some malicious packages in the AUR before. Remember these are user packages and are not from archlinux.

  • Like 1
securitybreach
Posted

The first three links are good though.

  • Like 1
abarbarian
Posted
1 hour ago, securitybreach said:

The first three links are good though.

 

Yer right with AUR packages it is always wise to do some research. 

 

That bash script is the one I posted about before and is super neat and safe and simple. Easy to check the script out and very much KISS. 😋

  • Agree 1
securitybreach
Posted
10 minutes ago, abarbarian said:

That bash script is the one I posted about before and is super neat and safe and simple. Easy to check the script out and very much KISS. 😋

 

:thumbsup:

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...