I've got a USB stick (SanDisk Cruzer Facet 64G) which seems to be worn out. I had filled it to the brim with a lot of small-ish files (500kB each), which went well, no performance issues; and when I wanted to remove them, it took ages to remove even a single file. I suspected that the relatime
mount option was a problem as every unlink
might hit the block containing the used-blocks chain, resulting in dismal performance. I re-mounted with noatime
, and this time the deletion of all files went very fast.
Out of curiosity, I copied some small files on it again, this time it has massive performance problems. Speed went down to few kB per second as soon as the FS cache was full. Same when mounted with sync
.
I then re-created the filesystem on it (ext4), but the problem persisted.
I used badblocks -w
, but this reported no bad blocks at the start of the stick (the first 2000 blocks or so). (Should I have it run through to the end?) I then re-created a partition on it (flagged lba, sector-aligned, partition start at 4096s), but the problem still persists.
Not sure what to make of this, except that this is a symptom of write amplification: Since the stick was full to the brim with small files, each new write now results in read-delete-modify-write.
I tried TRIM, but that only resulted in fstrim: SAN_M: FITRIM ioctl failed: Remote I/O error
. It appears the USB controller doesn't support TRIM.
How can I get this USB stick (it still accepts files, albeit at a dismal performance) back to its old performance, without TRIM?
Thanks.