On 23 April 2012 07:54, Eric Smith <eric at brouhaha.com> wrote:
There's a major DISADVANTAGE of a lot of
solid-state media, including CF
cards and SD cards. ?Because the erase block size inside the card is large,
they have to do blocking and deblocking to that size. ?When you write a
sector, the erase block containing that sector is read into a buffer in the
controller. ?(The controller is part of the memory card, not part of the
computer; the computer has a host adapter.) ?The sector data gets buffered,
but not immediately written to the flash, because you don't want to wear it
out with unnecessary erase cycles. ?When you write more sectors in the
vicinity, they go into the buffer. ?Eventually the block does get erased and
the data rewritten.
Now suppose that you're running a multitasking OS with n files open for
write. ?If you nave at least n of these buffers in the controller, things
work smoothly. ?If the controller has fewer than n, it has to do the
erase/write cycles more often. ?If n is much smaller than the number of
files you are writing, the performance becomes very bad, and the wear to the
flash goes up substantially.
For CF and SD cards, the number of buffers in the controller is very small.
?Some have as few as two; the most I've seen is six. ?These cards are not
meant for replacement of disks that have a lot of parallel activity. ?That's
a serious concern when using them to replace SCSI or IDE drives. ?The
intended usage mode for these cards is with MP3 players, which don't write
much at all, cameras that generally only write one file at a time, and thus
need only two buffers (data and FAT), and for manually transferring files,
which also is usually only done one file at a time.
At one point I saw a web page where various memory cards were benchmarked,
and the number and size of the controllers' internal buffers were deduced,
but I didn't save a link to it and am too lazy to find it again right now.
SSDs with an IDE or SATA interface are intended for use as general-purpose
disks, so (some? many? most?) of them don't have this problem, although
there is a lot of variation between vendors. ?Off-brand SSDs, and even some
name-brand ones, have been known to have this and other problems, but the
name-brand vendors generally have gotten their act together.
This is fascinating stuff - thanks for that. I have not seen this info
anywhere else.
--
Liam Proven ? Profile:
http://lproven.livejournal.com/profile
Email: lproven at cix.co.uk ? GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lproven at
hotmail.com ? Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 ? Cell: +44 7939-087884