You are not logged in.
Background of the situation:
Btw, I never did any maintenance for SSDs because before I used Windows and I supposed it was done automatically. I finished a fresh installation and configuration of my Arch linux, on an SSD, and I completely forgot to take care of setting up services to maintain the number of writes to it. I have read NOW the wiki pages about TRIM and isntalling arch on an SSD, but I have concerns becaue I have already did a lot of disk writing and deleting.
What I have done:
I installed arch on a new NVMe drive (Kingston SKC2500 250GB, 150TBW btw), made one fat32 boot partition for grub2 and one ext4 partition for the system. After installation, I compiled ungoogled-chromium (oops) which wrote and deleted about 15 GB (I have 32 GB of ram, but I df -h reported 15 GB on the disk anyway, side question: is it possible to compile things from AUR in RAM exclusively?). The other concerning thing I did is that I overwritten one config file (~/.config/i3/config, specifically) about 100 times to make it work properly, and as we know, rewriting is bad for SSDs. 150TBW / 250GB is about 600 so 100 writes would mean that 17% of that sector's life is wasted already :(
My worries:
1. Since overwriting isn't deleting, there is no benefits from trimming there, so I think SSD's controller took care about my config file such as caching it properly and not overwriting whole 128-page sections for that one 10kb file, but I would like someone to reassure me for it, please.
2. Since I didn't turn on the fstrim.timer right after the first boot, nor I configured the ext4 partition with "discard" option (for continuous TRIM), I am worried that the chromium's deleted compiled files will never be reported by this fstrim service and that SSD will always rewrite whole sections on which those compile files were used. Do I have to do some full-disk analysis and maintenance so that the linux can actually reported all the free space to the SSD so it can continue using the fstrim service properly? And if so, how?
I am really sad about it and would really appreciate if someone helped me and reassured me that I didn't waste my SSD's life.
Thank you
Last edited by donaastor (2022-03-19 17:16:34)
Offline
would mean that 17% of that sector's life
https://en.wikipedia.org/wiki/Solid-sta … r_leveling
side question: is it possible to compile things from AUR in RAM exclusively?
If you have enough… https://wiki.archlinux.org/title/Makepkg builds wherever the PKGBUILD is
Since I didn't turn on the fstrim.timer right after the first boot … I am worried that the chromium's deleted compiled files will never be reported by this fstrim service
https://wiki.archlinux.org/title/Solid_ … iodic_TRIM
The service executes fstrim(8) on all mounted filesystems on devices that support the discard operation.
fstrim is ex post anyway.
Offline
Install smartmontools from repos and run (as root)
# smartctl -a /dev/nvme0n1Verify the data is from the correct drive, if not replace nvme01.
In the output look for "data units written" .
The number from my primary drive with / and most of home on which I compile lots of aur packages (including llvm & mesa trunk versions atleast once a week)
Data Units Written: 53,653,183 [27.4 TB]The drive has been in use since dec 2018, so a bit over 3 years. I run the fstrim command manually a few times per year.
Assuming an average of 10 TB writes per year I expect the drive to be usable for atleast 10 more years.
(It will probably be replaced in 5 or 6 years )
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Trim is very overrated. Comes from a time when SSDs cost 10x the money while providing 1/10th the storage capacity... it was an investment and so, people worried about lifetime a lot.
I have some old 64GB SSDs which still work fine but just don't use them anymore because there's simply not enough space on them...
250GB SSDs already suffer the same fate today, they work fine but people throw those out of their brand-new laptops anyway, to replace with TB ones.
So if you're happy with 250GB, if you know where to look, you can pick them up cheap in nearly unused condition (from laptops with pre-installed Windows images).
For simple home use you can choose not to use trim/discard at all and you probably still won't notice any difference years later... for a database server where every little bit of performance counts, it might be a different story.
Make backups! Any drive may fail at any time for any reason. SSD or not, TRIM or not, make backups! TRIM also prevents any kind of data recovery on the drive, so that makes backups even more important than they already are.
Offline
@seth @Lone_Wolf @frostschutz Thank you all for replying! I worry much less indeed and will check the smartctl now. I will just need a little help with a term here...
fstrim is ex post anyway.
by ex post you mean something like retro-spective? sorry, i'm not so experienced in english
Last edited by donaastor (2022-03-19 16:43:16)
Offline
... and as we know, rewriting is bad for SSDs
We know this? How? Why?
I have an arch system that's been on this laptop for years on an SSD and I've done absolutely nothing to configure trim in any way (and I bought it used / refurbished on ebay). No service, not extra fstab flags. And there are no problems. The concerns you reference were either A) always nonsense, or B) once-upon-a-time relevant when SSD's were new and the kernel / filesystems were not equipped to handle them well; but those days are long gone.
I am really sad about it and would really appreciate if someone helped me and reassured me that I didn't waste my SSD's life.
Are you experiencing any problematic symtpoms? If not, consider yourself reassured. If you are, I'd still question whether they had anything to do with "excessive writes" or any lack of explicit trim settings.
Last edited by Trilby (2022-03-19 16:49:47)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
We know this? How? Why?
Sorry, I was referencing to how there are limited number of writes on SSDs. That's the "knowledge" I have lol
Thanks for reassuring :)
Last edited by donaastor (2022-03-19 16:48:26)
Offline
by ex post you mean something like retro-spective?
Yes. The service simply runs https://man.archlinux.org/man/core/util … strim.8.en periodically and the latter will look at the disk and the filesystem and discard unused blocks. It's not somehow tracking the FS interaction.
Offline
@Lone_Wolf I did my smartctl, here is the output:
smartctl 7.3 2022-02-28 r5338
...
Model Number: KINGSTON SKC2500M8250G
...
Namespace 1 Size/Capacity: 250,059,350,016 [250 GB]
Namespace 1 Utilization: 25,423,831,040 [25.4 GB]
Namespace 1 Formatted LBA Size: 512
...
SMART overall-health self-assessment test result: PASSED
...
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 29 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 0%
Data Units Read: 28,097 [14.3 GB]
Data Units Written: 69,441 [35.5 GB]
Host Read Commands: 407,878
Host Write Commands: 726,167
Controller Busy Time: 10
Power Cycles: 14
Power On Hours: 60
Unsafe Shutdowns: 0
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0Error Information (NVMe Log 0x01, 16 of 256 entries)
No Errors Logged
and my trimming result:
$ sudo fstrim -v /
[sudo] password for ***:
/: 224.5 GiB (241107722240 bytes) trimmed
My SSD is indeed completely fine, 0.024% used, it must be fine :D
Thank you
Last edited by donaastor (2022-03-19 19:19:51)
Offline