Stop Your SSDs From Getting Sluggish Over Time
Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop Your SSDs From Getting Sluggish Over Time
🧩 The Challenge
Ever had an SSD start feeling like an old spinning rust drive after a few months? You bought it for speed, but now file operations just drag. Happens all the time, especially in VMs or if you’re not using newer kernel versions with default trimming. And honestly, nobody tells you this stuff when you’re setting up new servers.
💡 The Fix
We need to tell your SSD which blocks it doesn’t need anymore. But getting that consistent speed back is actually pretty simple. A quick command or a systemd timer will get that performance back without a reboot or complicated tweaks.
sudo fstrim -av
sudo systemctl enable fstrim.timer --now
⚙️ Why It Works
This command tells the drive controller which blocks are no longer in use by the filesystem. It helps the SSD’s internal garbage collection, keeping its write performance consistent over its lifetime. The timer ensures it happens regularly.
🚀 Pro-Tip: Check `lsblk –discard` to see if your block devices even support TRIM.
Linux Tips & Tricks | © ngelinux.com | 11/3/2026
