• Little trick

    From digimaus@618:618/1 to All on Sun Jan 25 16:12:34 2026
    Hi everyone,

    I discovered a little trixk that will help keep a SSD clean and maintained under Linux.

    I ran "fstrim -av".

    ===
    When you delete a file on a normal filesystem, the OS just marks the space as "free," but the SSD itself doesn't know that. From the SSD's point of view, those blocks still look occupied.

    fstrim sends a message to the SSD saying:

    "These blocks are no longer in use -- you can wipe them internally whenever you want."

    That lets the SSD:

    clean up unused blocks

    prepare them for fast future writes

    reduce write amplification

    maintain long-term performance
    ===

    My result?

    I freed up 406GB of space on a 512GB SSD.

    The speed-up was immediately noticable.

    -- Sean

    ... Mary had a little RAM; only about a meg or so.
    --- MultiMail/Linux
    * Origin: Outpost BBS * Johnson City, TN (618:618/1)
  • From Shurato@618:300/50 to digimaus on Sun Jan 25 22:00:00 2026

    Hi everyone,

    I discovered a little trixk that will help keep a SSD clean and maintained under Linux.

    I ran "fstrim -av".

    === When you delete a file on a normal filesystem, the OS just marks
    the space as "free," but the SSD itself doesn't know that. From the
    SSD's point of view, those blocks still look occupied.

    Nice! Windows 10 and 11 supposedly have the option to schedule this, but it almost never runs... Should I have a cronjob for this weekly, or does it
    just need to be run once?

    --
    Shurato, Sysop Shurato's Heavenly Sphere (ssh, telnet, pop3, ftp,nntp,
    ,wss) (Ports 22,23,110,21,119,999)


    *** THE READER V4.50 [freeware]
    ---
    * Origin: Shurato's Heavenly Sphere telnet://shsbbs.net (618:300/50)
  • From Zip@618:500/27 to digimaus on Mon Jan 26 21:17:35 2026
    Hello Sean!

    On 25 Jan 2026, digimaus said the following...

    I discovered a little trixk that will help keep a SSD clean and
    maintained under Linux.

    I ran "fstrim -av".

    Yep, that's a nice command!

    On my Debian system there's a "util-linux" package which contains the fstrim utility as well as a systemd timer (fstrim.timer), which one can enable make it run weekly.

    I was also amazed at how much space is "freed". I guess temporary logs and stuff contribute a lot to this...

    Best regards
    Zip

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: Star Collision BBS, Uppsala, Sweden (618:500/27)
  • From digimaus@618:618/1 to Zip on Mon Jan 26 19:59:59 2026
    Zip wrote to digimaus <=-

    I was also amazed at how much space is "freed". I guess temporary logs
    and stuff contribute a lot to this...

    I was shocked to see how much room was freed. I need to run this on my little Dell laptop as it has a 128 GB mSATA drive in it that would benefit from this.

    Well, maybe not. I do want to encrypt the drive using LUKS here soon so I'll do that after I reinstall Slackware.

    Either way, nice to know. FreeBSD has special utilities to run on SSDs to not write to them as much to extend the drive's lifetime.

    -- digi <8D~

    ... She got the goldmine; I got the shaft.
    --- MultiMail/Linux
    * Origin: Outpost BBS * Johnson City, TN (618:618/1)
  • From Zip@618:500/27 to digimaus on Tue Jan 27 21:22:40 2026
    Hello Sean!

    On 26 Jan 2026, digimaus said the following...

    I was shocked to see how much room was freed. I need to run this on my little Dell laptop as it has a 128 GB mSATA drive in it that would
    benefit from this.

    Yep, that could probably make quite some difference!

    Either way, nice to know. FreeBSD has special utilities to run on SSDs
    to not write to them as much to extend the drive's lifetime.

    I used to increase the "commit" value for ext4 file systems on my Debian box... But to lower the chances of losing data in case of power interruptions (brownouts, outages etc.) I actually skipped doing that some time ago, as the TBW values and the age of the SSD indicated that the disk should hold up for another 75 years or so anyway. :-D

    Best regards
    Zip

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: Star Collision BBS, Uppsala, Sweden (618:500/27)