Hacker News new | ask | show | jobs
by codehero 4328 days ago
Can anyone comment on the read/write performance of SPI flash? Seems like it would be similar in performance to SD card, but without the wear leveling?
2 comments

SPI flash is usually NOR flash (not NAND like you'd find in an SD card or SSD). NOR flash is usually SLC and will take 100k writes/erases and is quite simple to access (as compared to MLC NAND which only usually takes 3k erases and is a pain to access comparatively due to things like ECC requirement).

SPI flash generally will do on the order of 0.5 MB/s erases, slightly faster writes, and somewhere in the realm of 4 to 12 MB/s reads, give or take. It's not high performance but it's simple, cheap, and low pin-count. The host controller is responsible for wear leveling, erasing each needed sector/block, and all writes, as SPI flash is unmanaged (compared to SD cards which are managed memory).

AFAIK, SD cards do not have wear leveling, SSD drives do.
Many SD cards have wear leveling built in, but most of the algorithms and CPUs used for the controllers are quite crap at wear leveling. If you start looking at more industrial targeted SD cards you'll find quite decent wear leveling.
Most of them do some kind of wear leveling, but they usually use cheaper flash and less capable controllers and the controller algorithms are mostly oriented around making them usable for sequential writes as you see with a digital camera, not for making a good drop-in replacement for rotating disks.