Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Hardware] Why isn't SSD optimization enabled by default in Debian?
-
- Posts: 2
- Joined: 2023-03-27 18:02
- Has thanked: 3 times
[Hardware] Why isn't SSD optimization enabled by default in Debian?
I'm new to Debian (Linux in general). I have used Linux Mint before, but there I find no guide about SSD optimization. But in this forum I found SSD optimization guide which is very useful.
But my question is, why aren't these optimizations made by default rather than the user doing them manually? Do they cause problems sometimes? If I don't follow the guide & make those optimizations, will there be any problem in my SSD? Sorry for such an awkward question
But my question is, why aren't these optimizations made by default rather than the user doing them manually? Do they cause problems sometimes? If I don't follow the guide & make those optimizations, will there be any problem in my SSD? Sorry for such an awkward question
- Hallvor
- Global Moderator
- Posts: 2042
- Joined: 2009-04-16 18:35
- Location: Kristiansand, Norway
- Has thanked: 151 times
- Been thanked: 212 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
I understand that trying to limit the number of writes can help minimize write operations that aren't necessary and thereby increasing the SSDs longevity. Take atime, for instance, where any disk read is followed by a write to disk.
But is is a mistake if one believes that SSD optimizations are necessary to prevent them from going down in flames. They have a long lifespan even without any optimization.
As far as I know, a feature like fstrim isn't enabled because not all SSDs support the TRIM command, and noatime will cause issues for some users who need file access times recorded.
I have enabled fstrim and noatime, and I threw out an SSD from 2014 a few days ago - not because it didn't work, but because I wanted more space. That's a longer life than any of my HDDs.
Whatever you choose to do, don't blindly copy and paste advice online.
But is is a mistake if one believes that SSD optimizations are necessary to prevent them from going down in flames. They have a long lifespan even without any optimization.
As far as I know, a feature like fstrim isn't enabled because not all SSDs support the TRIM command, and noatime will cause issues for some users who need file access times recorded.
I have enabled fstrim and noatime, and I threw out an SSD from 2014 a few days ago - not because it didn't work, but because I wanted more space. That's a longer life than any of my HDDs.
Whatever you choose to do, don't blindly copy and paste advice online.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD
- sunrat
- Administrator
- Posts: 6494
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
There is a systemd fstrim service and timer set up automatically if an SSD is detected. Check if it is present:
It runs once a week so this will show loaded/inactive and list the last time it ran fstrim.
noatime is easy to add to /etc/fstab if you wish. IIRC relatime is default anyway.
I wrote a guide last week on how to move browser profile and cache to RAM, that saves a lot of writes and access - viewtopic.php?t=154253
As Hallvor said, it's not really something to worry about these days. My current SSD has 27,000 hours uptime and one in a computer I retired last year is 12 years old.
Code: Select all
systemctl status fstrim
noatime is easy to add to /etc/fstab if you wish. IIRC relatime is default anyway.
I wrote a guide last week on how to move browser profile and cache to RAM, that saves a lot of writes and access - viewtopic.php?t=154253
As Hallvor said, it's not really something to worry about these days. My current SSD has 27,000 hours uptime and one in a computer I retired last year is 12 years old.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
- BBQdave
- df -h | participant
- Posts: 152
- Joined: 2011-09-25 03:38
- Location: North Carolina
- Has thanked: 9 times
- Been thanked: 14 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
+1
Debian 11 install detected my SSD and fstrim is on a timer to run once a week. All automatic
On quest for blue smoke and red rings!
Debian 12 Toshiba Satellite C655 | i3 2.3Ghz | Intel HD Graphics 3000 | 8GB RAM | 65GB SSD
Debian 12 Toshiba Satellite C655 | i3 2.3Ghz | Intel HD Graphics 3000 | 8GB RAM | 65GB SSD
- Hallvor
- Global Moderator
- Posts: 2042
- Joined: 2009-04-16 18:35
- Location: Kristiansand, Norway
- Has thanked: 151 times
- Been thanked: 212 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD
-
- Posts: 2
- Joined: 2023-03-27 18:02
- Has thanked: 3 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
Thank you everyone who replied. My confusion is over now.
- FreewheelinFrank
- Global Moderator
- Posts: 2111
- Joined: 2010-06-07 16:59
- Has thanked: 38 times
- Been thanked: 231 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
Glad you found an answer, but there is really no need for oversize and coloured fonts.
You can use the thumbs up button to thank those who helped you.
- sunrat
- Administrator
- Posts: 6494
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
Indeed. The wiki has some very outdated information. The discard option in particular has been discouraged for a long time and may even be detrimental. It does hint not to use it but probably shouldn't even be mentioned.Hallvor wrote: ↑2023-03-28 07:38Nice.
It looks like it's time to update the Wiki, then.
https://wiki.debian.org/%20SSDOptimization
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
- BBQdave
- df -h | participant
- Posts: 152
- Joined: 2011-09-25 03:38
- Location: North Carolina
- Has thanked: 9 times
- Been thanked: 14 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
I am probably stating the obvious for most, but I will offer the thought that systemd fstrim service is kernel level and (given you have a SSD) will function on a timer on any GNU Linux install.
You can check the services on timer with:
$ sudo systemctl list-timers
Edit: You may want to stretch your terminal window wide, the output is a lot of information per listed service. And you strike the q key to exit out of the command above.
You can check the services on timer with:
$ sudo systemctl list-timers
Edit: You may want to stretch your terminal window wide, the output is a lot of information per listed service. And you strike the q key to exit out of the command above.
On quest for blue smoke and red rings!
Debian 12 Toshiba Satellite C655 | i3 2.3Ghz | Intel HD Graphics 3000 | 8GB RAM | 65GB SSD
Debian 12 Toshiba Satellite C655 | i3 2.3Ghz | Intel HD Graphics 3000 | 8GB RAM | 65GB SSD
-
- Global Moderator
- Posts: 2709
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 41 times
- Been thanked: 201 times
Re: [Hardware] Why isn't SSD optimization enabled by default in Debian?
Perhaps we need make the user a member of adm, but sudo is not needed.