melcat Offline Upload & Sell: Off
|
jcolwell wrote:
A solid state storage device will fragment, if there's not sufficient contiguous free space for the next new file being written. This usualy won't happen if you're writing many relatively small files in a large space, like 25 MB RAW files on a 64 GB card, but if the card is in use for a long time, with frequent file deletions, never getting formatted, then the FAT can become a pretty freaky place, where it might be tough to find contiguous space for a video clip, for example. Not a common situation, for sure, ...just sayin.
In the case of the DCF format on top of FAT, which is what's normally in cameras, there won't be much fragmentation if you format reasonably frequently and you chimp a bit.
To start with, the file allocation table itself won't fragment, because it is a fixed size structure allocated when the volume was formatted. It has one number per cluster plus two more numbers. Because it does not grow incrementally, it does not fragment.
Flash memory is accessed by page (typically 4kB) and read and written in blocks of typically 128 to 512 pages. These are similar to sectors and tracks on a spinning disc, except that a single sector can be written to but on flash an entire block has to be erased and rewritten just to update one page on it. Therefore it's a good idea to keep all the pages for a file together in the same blocks and not mixed in with those of other files (fragmented).
Now note that raw files are always going to be larger than a block, and the camera is only writing them one at a time. If no files are ever deleted, the only time two raw files share the same block is at the end of one file and the start of another. If you delete one or other of those files, the next raw file that's written may pick up those pages. Because a raw file is much larger than a block, writing just a few of them will tend to "clean up" any fragmented blocks.
The other source of fragmentation is the directory.
So, yes, it's a good idea to format cards when there's no longer anything on them you want to save.
What is a problem is write amplification, which is the expensive process of having to erase and rewrite a block just to update a single page. For stills shooters, this occurs on the file allocation table (when creating files) and when rating images (updates a value in the raw flag). Although a performance problem, it is not fragmentation, and reformatting won't mitigate it.
|