On 2022-07-31 at 10:51, pe...@easthope.ca wrote: > From: Linux-Fan <ma_sys...@web.de> > Date: Sat, 30 Jul 2022 21:37:37 +0200
>> Formatting it to ext2 should work and not cause any issues ... > > Other authorities claim "factory format" is optimal and wear of flash > storage is a concern. A revised "format" can impose worse conditions > for wear? Does any manufacturer publish about this? What is hope? > What is truth? I would interpret a statement like that as referring to block size and possibly alignment. As I understand matters, flash storage is capable of writing only block-at-a-time; if you try to write a smaller unit than one hardware block, the device has to read the contents of the block into memory, replace the part of it that you want to write with your updated contents, and write back out the entire block. In practice - again, as I understand matters - that has multiple consequences. (If I've got things wrong, I'm sure people will jump in and correct me.) One is that if you have a filesystem on the device which is trying to use a block size that is smaller than the hardware block size, every write will result in this read-and-write-back behavior, which is slower than a pure write. Another is that if you have a filesystem on the device which is trying to use a block size that is *larger* than the hardware block size, nearly every write will result in writing more blocks than intended - one or more full blocks, and at least one partial block which needs to be read in and written back out. Not only is that slower than a pure write, it also results in more separate instances of writing a block, which puts more wear on the flash. Another is that if you have a filesystem on the device whose blocks are the same size as the hardware block size, but which is not *aligned* so that its first block *starts* at the beginning of a hardware block, *every* write will result in writing multiple hardware blocks - the one where the filesystem block begins, and the one where it ends. That winds up being even slower, and putting even more wear on the flash. The net result is that it's better for both performance and longevity to ensure that a filesystem on flash storage is using the same block size as the underlying hardware *and* is properly aligned to the block boundaries of that hardware. The filesystem that's on the device when it's shipped from the factory is almost certainly already configured in this way. My understanding is that that is usually what is meant by saying that the "factory format" of a flash storage device is optimal. If you know what the block sizes are and know how to specify things properly when creating a filesystem, however, it should be entirely possible to create a different filesystem on the device which is also properly sized and aligned in that same optimal way. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature