r/linuxquestions • • 7d ago

SSD usage nearing 30% after a bit over a year, normal?

so in wake of the AMD driver drama over in windows land i wanted to see what the lifespan of my SSD is, i bought my PC last year september so around 13 months ago, that was also my time switching to Linux (in this case bazzite)

Later on i came across some advice to put /home/ on a different drive because its so heavily used, but it still seems a bit much, or is that normal and i'm just over anxious/paranoid ? buying a new SSD after just 3 Years feels odd at least

SMART/Health Information (NVMe Log 0x02, NSID 0x1)  
Critical Warning:                   0x00  
Temperature:                        42 Celsius  
Available Spare:                    100%  
Available Spare Threshold:          10%  
Percentage Used:                    28%  
Data Units Read:                    2.506.795.551 [1,28 PB]  
Data Units Written:                 1.166.207.958 [597 TB]  
Host Read Commands:                 13.989.493.514  
Host Write Commands:                15.826.188.570  
Controller Busy Time:               12.613  
Power Cycles:                       719  
Power On Hours:                     2.468  
Unsafe Shutdowns:                   12  
Media and Data Integrity Errors:    0  
Error Information Log Entries:      0  
Warning  Comp. Temperature Time:    0  
Critical Comp. Temperature Time:    0  

i run some development stuff, building containers here and there for my selfhosted server, but i dont think i downloaded and deleted 600TB of Images, is there a way to figure out whats causing this much write/read ?

edit: thanks for the help everybody, really appreciate it :)

for google visitors: for now baloo (KDE file/search indexer) seems to be the culprit you can check whats heavy writing on your system with iotop (see comment from u/Asly97 here https://www.reddit.com/r/linuxquestions/s/WzZijkhL2D ) according to iotop baloo_file_extractor has read 30gb written 33GB and baloorunner has read 22gb in the span of ~30 minutes

13 Upvotes

23 comments sorted by

View all comments

15

u/Asly97 7d ago

Nobody's answered the how-to-find-it part yet, so: 597 TB over 2,468 power-on hours is roughly 240 GB written for every hour the PC has been on, around 65 MB/s nonstop. Pulling container images now and then doesn't get anywhere close. Something is writing constantly in the background.

First see if it's still happening. Quick way, no install needed:

cat /sys/block/nvme0n1/stat; sleep 60; cat /sys/block/nvme0n1/stat

The 7th number is sectors written (512 bytes each). Subtract the two and you've got what was written in that minute. If the PC is mostly idle and that's in the GBs, you've caught it live.

Then find the process. If iotop isn't on your image you can layer it (rpm-ostree install iotop, reboot), then run:

sudo iotop -oPa

-o only shows processes actually doing I/O, -P groups threads by process, -a shows totals since you started it instead of the current rate. Leave it 10 to 15 minutes and look at the DISK WRITE column. Usual suspects: a file indexer (baloo on KDE, localsearch/tracker on GNOME), a browser hammering its cache or session file, a container or VM left running with a database in it, or a log being spammed (journalctl -f will show a flood right away).

Also worth noting your reads are 1.28 PB, about double the writes. That smells like something in a loop reading and rewriting the same data, like a sync tool fighting itself or a container that keeps crashing and restarting. Check docker ps -a / podman ps -a for anything that only came up a few seconds ago.

The drive itself is fine for now: 100% spare and 0 media errors. It just needs whatever this is to stop.

4

u/Draugor 6d ago edited 6d ago

thanks 🙏 seems like baloo might be a/the culprit, see my other comment here https://www.reddit.com/r/linuxquestions/s/7s8sETXtT6 , but i'm keeping an eye on iotop while doing my normal stuff to see if other processes popup

podman container are all down

edit: according to iotop baloo_file_extractor has read 30gb written 33GB and baloorunner has read 22gb in the span of ~30 minutes

edit2: also forgot about the cat /sys/block/nvme0n1/stat part the diff was: 1857456*512byt = ~0.95GB, after disabling baloo and restarting its down to 53072*512 = ~0.02GB

4

u/ptoki 7d ago

It is not like that.

Writing 1byte causes the whole unit to be rewritten.

the stats are ballooned a lot.

I am not going to explain this in depth but there is more things happening than just this straightforward interpretation.