libera/#devuan/ Saturday, 2025-03-22

gnarfacedavesp, rrq: from what i've read it's filesystem specific not distro specific, and all the dire warnings about how much it matters to drive life are based on years outdated info with buggy drivers and disk firmware long since patched, it's purely a performance concern now, and most filesystems will handle it transparently as necessary iirc01:51
ted-iousgnarface: I can confirm that not trimming the sd card in a raspberry pi means it will die and so far trimming a different sd card in the same raspberry pi has let me use it much more over the past year and a half.01:54
gnarfaceprobably a ancient buggy firmware as mentioned01:55
ted-iousI have had 3 die and so far 2 are running with weekly trims and working perfectly.01:55
gnarfacewhat they're supposed to do is just invoke trim internally when they hit the wall, it's just that there's a big performance impact doing that... i've got SD cards in service for years now i've never trimmed01:55
ted-iousIn one case it was a 32gb samsung sd card that died and was replaced with another one purchased in the same batch that is still working perfectly now that I started trimming regularly.01:56
gnarfacedata loss, corruption, hardware failure, all of those things are supposed to have been solved at the manufacturer's end and in the filesystem drivers01:56
gnarfacefor performance, some filesystems that don't invoke trim right though still need it01:56
gnarface(xfs, notably)01:56
ted-iousDo you mean some linux filesystems invoke trim without the user requesting it?01:57
gnarfacewell it's not like a periodic job, calling trim the binary, no, it's just properly accessing the internal mechanism, which iirc you can still disable if you want01:58
gnarfaceat least in ext401:58
gnarfacesome people still opt to do that for performance enchancement01:58
gnarfacebut nothing should be actually burning out or corrupting data unless it's really old hardware and really old kernels01:58
gnarfaceat least, so i've read, and as i said, i've got numerous SD cards in operation i've never bothered trimming...01:59
ted-iousWell I think the other person who I won't mention because I don't want to ping him was certainly correct that automatic trim is a terrible idea for most systems especially windows from what I have read.01:59
gnarfacethey write and delete gigabytes a day, so i know it would have died by now on timeframes you're talking about01:59
ted-iousBut that's because you're trimming every single filesystem block you delete so of course that is going to cause write amplification.01:59
ted-iousThat's very interesting.02:00
gnarfaceyes, like i said, many people still opt to disable trim and set their own schedule for a manual call to trim even if their filesystem can handle it, because it's a raw performance concern02:00
ted-iousAre they respberry pi's running devuan?02:00
gnarfaceone is02:00
gnarfacei googled the information i got, it should still be possible to find this... all the dire warnings about hardware failures and filesystem corruptions related to failure to set your own trim job should now be stale info from the very early months of SSD support in linux02:02
gnarfaceif you're for example running xfs though and don't set your own trim job, you'll still see the slow creeping write-throughput reduction issue early windows users were complaining about, but it shouldn't actually lose data or burn out the hardware unless you've got very old drive firmwares and very old kernels running on them02:03
gnarfacethat raspberry pi running devuan on a SD card had been writing and then deleting about 5.2GB of raw timelapse images for something like 5 or 6 years already before i even heard the rumor you're supposed to even trim SD cards (it's actually older than devuan though and initially it was running raspbian)02:06
ted-iousWow that's great to know.02:06
gnarfacesometimes i try to trim the microsd in my pinephone to see if it'll make waydroid boot faster but it seems to actually make it slower so i'm not even sure it's always a good idea for performance improvement these days either02:07
ted-iousHow big is the sd card in your raspberry pi and how full is it?02:08
gnarfacewell it's 32GB, i write and delete about 5GB to it daily, then re-upload a ~115-145MB compressed synopsis of that every evening or so, and i think about every 6 months it fills up then i re-compress a longer-term timelapse from those, upload that to an external backup server and delete the whole lot and start over02:10
gnarfacelike i said, been doing this with the same SD card since the raspbian that before devuan jessie02:11
gnarface*that came before02:11
gnarfaceraspbian wheezy?02:11
gnarfaceit might matter that i'm using resierfs on it; ext3/ext4 have been known to be very hard on flash media and if you've burned out multiple SD cards in the same amount of time i'd blame ext* on it in general rather than the trim jobs specifically02:12
gnarfaceyou might want to turn up the discard interval a bit to02:12
gnarfaceto reduce journaling related wear02:12
gnarface(or just switch to xfs)02:13
ted-iousOh so xfs is actually good about automatically trimming?02:15
ted-iousI thought you said that it didn't do it properly.02:16
gnarfaceno no, i'm saying the exact opposite; ext3/ext4 are "good about automatically trimming" and i'm suggesting you might want to actually turn it off or increase the "discard" interval to slow it down - xfs doesn't support trim at all and if you care to use it you'll have to set a cron job02:17
gnarface(discard is a mount option)02:17
gnarfacebut xfs, like reiserfs, just seems to be more gentle on SD cards than ext3/ext402:18
gnarfacei have burned out at least 1 flash key by using ext4 on it, and after far less wear too02:18
gnarfacei'm wary of it in general, i've also had several issues of unrelated data corruption just due to bugs in the e2fsprogs02:19
ted-iousOh ok sorry I was forgetting that discard meant automatic and didn't realize you were talking about doing it manually.02:20
gnarfacesorry i'm kinda jumping back and forth between both parts of the topic02:22
ted-iousSo when you say xfs doesn't support trim at all do you mean fstrim too or just discard?02:24
gnarfacelemme try to clarify02:24
gnarfacexfs doesn't support trim so you might want to run fstrim manually if you're using it, but on modern hardware you shouldn't have to strictly speaking02:25
ted-iousOk. :)02:25
gnarfaceext4 does support trim, but you might want to mount ext4 drives with options like: defaults,discard,commit=100 for example, to slow it down a bit02:25
ted-iousAnd relatime.02:26
gnarface(just because ext4 seems a bit rough on flash media in my experience)02:26
gnarfacerelatime should be the default now, that's also old news02:26
gnarfacemore stale than the trim info, in fact02:26
gnarfacethe SSD i have ext4 on that i mount with "defaults,discard,commit=100" options doesn't have much write traffic, it's just a media streaming box, so write throughput to disk is not as important, but i turn up the journal commit interval a bit anyway just to try to reduce wear, there's some risk of data loss in theory if there were a sudden power loss but it's on a UPS and it's not storing anything of value anyway02:29
gnarface(turning the commit interval up much higher than 100 seemed to destabilize the system but ymmv)02:31
gnarfacebut all drives are supposed to handle triggering trim themselves when necessary now, it's supposed to be purely a performance concern, except in the case of some buggy firmware shipped with very early products that started all these rumors02:32
gnarfaceso i've read, anyway02:33
fluffywolfmy impression is that trim is obsolete on any modern real ssd, as they all do wear leveling that moves data from infrequently-written blocks.02:34
gnarfaceyea i haven't benchmarked it myself really, but i'm lead to believe that sometimes you might want to take it into your own hands just to have more predictable performance metrics02:35
ted-iousHow do they know that a block was actually deleted?02:35
gnarfacei don't know, but i expect with most products in the wild you'd need some sort of proprietary toolkit from the manufacturer02:36
fluffywolfwhy do they care, is the real question.02:37
gnarface(the type of thing they don't give out without a NDA)02:37
ted-iousfluffywolf: Because if the flash controller doesn't know which blocks aren't being used anymore it can't do wear leveling.02:39
fluffywolfbut it can.  it can move blocks around that are in use.  the only possible benefit for trim is write speed improvements on sustained writes at full speed.02:41
fluffywolfthe controller will keep track of how many writes each block has, and swap frequently used ones with infrequently used ones to keep wear level, even if both are in use.02:42
gnarfacehmm, google's AI response still says it's about drive longevity - the obvious issue of feeding the AI with years of unfiltered bullshit02:45
gnarfacebut i'm pretty sure the updated contradictory information was written by a kernel dev...02:45
fluffywolfwith old ssds with crappy controllers it was definitely true...  but controller brains have increased with time.02:45
fluffywolfthat said, I'm not an expert - it's just what I've heard.  modern controllers are smart enough that it doesn't matter, except for large sustained writes where having the pages already blanked saves an erase.02:47
fluffywolffilesystems that are smart enough to understand ssd layout and minimize fragmentation make a difference, but I don't remember which one claims that.  lol02:48
gnarfaceyea, one would expect to still hit a performance wall at the point the drive has to trigger its internal trim mechanism, so for performance many people opt to schedule a preemptive trim02:48
gnarfacefluffywolf: an inherent side-effect of journaling itself in any journaling filesystem is supposed to be that it obviates the concept of fragmentation02:49
gnarfacethey should pretty much all be able to do that now02:51
gnarfaceok, dunked my head in water and now with more of my wits intact i have a couple corrections/amendments to the above information:04:14
gnarface1) the "commit" interval mount option apparently has nothing to do with trim (though i stand by my advice to consider increasing it above the default to potentially extend the life of SSDs with low disk traffic)04:15
gnarface2) trim in ext4 (which it unhelpfully calls "discard" in the mount options) may actually not be on by default; i thought it was but both the man page and my old notes say otherwise - but both those may be stale so if you care you'd better check to be sure04:16
gnarfacewell, the man page doesn't really say one way or another it just kinda seems to imply it's off04:17
gnarfacei generally try to avoid ext4 these days though so someone who has more current installs of it might have a better perspective04:18
Guest88how can I turn off services and prevent them from starting up at startup?21:11
rwpThe easiest and probably best thing is to uninstall anything that you don't want running.21:13
rwpIf you don't want to uninstall it then the second best thing is to install sysv-rc-conf and then use it to manage the symlinks.21:13
rwpThird best is to manage the init symlinks manually yourself.  Which is easy enough.21:13
Guest88you mean removing the symlinks?21:14
Guest88sorry I got disconnected?21:17
Guest88did you reply to my question of whether or not I should delete the symlinks manually?21:18

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!