What? Don't defrag an SSD. It shortens the life and does not help.
The whole point of defragging a rotational hard drive is that a badly fragmented file forces the drive's head to physically move around, seeking each piece of the file. This physical movement of seeking really slows things down.
Debatable - fragmentation can get so bad that you can't actually allocate space, if the free space is too badly fragmented - irrespective of where the blocks are on the physical media - space allocation on the filesystem at the OS level essentially breaks.
I've seen it happen, and this was a drive in a virtual machien that was stored on a SAN, so it was several layers of abstraction away from physical block allocation knowledge (VM, NFS, LBA on the drive, RAID striping, etc).
And whether or the physical location vs logical location is different or not, the
filesystem still needs to keep track of, allocate, and re-assemble fragments.
Sure, in theory SSD life is affected, and yes doing a defrag on a regular basis is pretty stupid on one.
But if it is
badly fragmented due to lack of space, freeing space and either reinstalling or defragmenting is not a such bad thing to get the file system in order.
Modern SSDs are rated at very, very high data rates, every day for several years worth of life.
A defrag
might shorten your SSDs projected life by a couple of days, tops. I.e., even if you do a defrag once per year, you'd still need to buy an SSD the week/month it actually fails.
Hard drives ALSO have an MTBF and doing a defrag on a hard drive can theoretically kill it too.
Modern SSDs from a reputable vendor are not terrible any more. I know of people running consumer grade SSD as write cache in big storage arrays (essentially to bundle heaps of small writes into efficient full stripe writes to disk), where every single write to the storage on multi-terabyte arrays is funnelled through the SSD. They're doing hundreds of gigs of writes every day.
Reliability still isn't that bad.