Allow me to lecture for a minute, because there are some things which are important to know about Flash storage:
1. None of the flash technologies are archive-quality.
This is inherent in the physics, flash will forget the bits if you write them, if you dont write them, if you read them, due to cosmic radiation and simply as time goes by.
FLASH IS SIMPLY NOT A SUITABLE ARCHIVE MEDIUM!
2. Flash is not just flash, but you can generally ignore that, because:
3. The most important factor in flash-wear mechanisms, is the "Flash Adaptation Layer" and how good it is at "Wear Leveling"
If you are using raw flash chips, you own that job yourself. If you just write a new firmware once in a blue moon, so you can ignore it entirely.
If you are using CF, SD, SSD, SAS, NVME or any other "cooked" flash, the Flash Adaptation Layer runs on a microcontroller inside the device.
All Flash Adaptation Layers deal with the same basic problem: You erase (much) larger blocks than the desired sector-size, and you cannot overwrite a sector.
Flash Adaptation Layers are therefore for all practical purposes filesystems.
When the computer writes to sector 445, the FAL must find empty space for a new "file", create it, write the data to it, and register the name ("445"), and if a file with that name previously existed, add the space that file occupied to the "to be erased list".
If all sectors in an erase-block are on the "to be erased list", life is wonderful, because the FAL can erase the block and add all the sectors to the "free" list.
The bad case, is that the FAL may run out of free space, in which case it has to find the "optimal" erase-block, copy all still-alive sectors out of it, and then erase the block to free up the previously used, but since retired sectors. (It follows, that some number of erase-blocks must always be held in reserve.)
This is called "write amplification": The computer writes a single sector, but physically many sectors are (erased and) written on the flash chip(s).
That will wear out the flash cells faster than you expect them to.
It is also, obviously, slow.
And fundamentally totally, utterly, stupid - unless optimized.
Imagine you write a single file which takes up all sectors on your CF card, and then you delete it again, and write another file which just needs a single sector.
The FAL does not know that you deleted the huge file, so it has to treat all those sectors as still valid, except for the single one you write.
"Wear leveling" is proprietry algorithms inside the FAL, which attempts to minimize this, while trying to spread the erase and write operations over all the erase blocks, to make the device last longer.
As a rule of thumb: The larger the "hidden" reserve of erase-blocks are, the longer the device will last.
But to avoid the stupidity, in addition to READ and WRITE, we now also have the DELETE primitive.
(Also known as "TRIM" and various other names, because the storage vendors are morons.)
The DELETE operation is used by the operating system to inform the FAL, that the content of a particular sectors are no longer wanted, allowing the FAL to move them directly on the "to be erased" list, vastly increasing the probability that erase blocks can be recycled with minimal write amplification.
In the above example, deleting the huge file should cause the OS to issue DELETE operations for all the file's sectors, and the FAL could start erasing all the blocks right away, without write-amplification, and without waiting for all the sectors to be overwritten.
There are basically three grades of FAL's: "Camera grade", "Consumer" and "Enterprise".
Any flash-media primarily aimed for camera use, CF, SD etc. is (almost) guaranteed to have first one, which is optimized for the single use case, where huge files are written sequentially in a FAT filesystem.
That allows the FAL to cut a LOT of corners, without loosing any performance in that specific application.
But if you stick a regular filesystem on a camera grade FAL, and do lots of single sector random writes, it becomes horribly slow over time.
As in: A single sector write can take tens of seconds.
The primary reason it degenerates so badly, is that Camera grade FAL only has one "open" erase-block at time, due to the limited RAM in the microcontroller, and cannot do anything else, while a block is being erased.
Camera-grade FAL didn't used to understand/support DELETE, but some high-end "Industrial" SD cards seem to do so now.
Some Camera-grade FAL's tried to be smart, by recognizing FAT filesystems, monitoring the cluster-table and creating their own DELETE operations when files were deleted.
If you used such a device for another kind of filesystem, while the FAL thought there was a FATfs on it, life became interesting. (This is what got me into flash 20+ years ago).
Some contemporary camera-grade FAL's seem to recognize a "format" where an empty FATFS is created, and uses the chance to erase everything.
All in all: If you write randomly, camera-grade FAL is not what you want, and the longer you use it that way, the slower it becomes.
(I'm beating up a couple of Kingston "industrial" microSD cards, they are clearly better for random writes than average microSD, but how much better is still TBD.)
Your regular 2.5"/MSATA SSD's and NVME sticks have consumer-grade FAL, to which the vendors added support for DELETE only when Microsoft got shitty about it.
The primary hardware difference is that the embedded microcontroller is faster and has more RAM, so it can keep track of multiple eraseblocks being "open" at
the same time, and usually it can erase one block per flash chip, while still serving traffic from the non-erasing flash-chips, and in high end consumer devices,
also service traffic from flash-chips while they erase block(s).
The quality, number of bugs and available features varies greatly.
Enterprise FAL has lots of bells and whistles, including keeping track of which blocks have been used how much, patrolling all the valid data, and evacuating it if the error correction code gets too unhappy etc.
The devices often also have a lot of DRAM and ultracapacitors, so they can cache things and still shut down safely.
Very interesting stuff, many patents, very expensive, but if your data and performance is important, your data and performance is important.
NVME has started to move in a direction where more of the OS's filesystem is handled by the FAL, so that instead of single sectors, you operate on multi-sector "objects" which, ideally, correspond to the files in the OS's filesystem.
In theory a good idea and, depending on your religion, the right direction architecturally.
In practice it has proven nearly impossible to migrate to. (See also: Intel Optane)
Final bit of advice:
If your SSD vendor tells you to upgrade the microcode in your SSD storage, do so, but only after making a backup of your data first.
Hope this helps, happy to answer questions.
Poul-Henning
Aka: The guy who ported M-Systems's Disk-On-Chip FAL to FreeBSD 20+ years ago.