Two questions --- SSD block sizes and buffering
freebsd-questions-local at be-well.ilk.org
Fri Apr 13 13:22:24 UTC 2018
"Ronald F. Guilmette" <rfg at tristatelogic.com> writes:
> In message <1cc45af6-bd4b-3854-4d37-8e9343786ce6 at qeng-ho.org>,
> Arthur Chance <freebsd at qeng-ho.org> wrote:
>>... man newfs says
>> The fragment size of the file system in bytes. It must be a
>> power of two ranging in value between blocksize/8 and blocksize.
>> The default is 4096 bytes.
>>so it's been fixed for 4k disks.
> Swell. But that may not really do much (in the way of improving performance)
> if the underlying mass storage device has a "native" block size of, say,
> 128 KiB. And as I noted, it is my understanding that essentially all
> flash-based mass storage devices -do- have a native block size of 128 KiB,
> or perhaps even larger.
That's not really relevant to performance the way it is with a
spinning-platter disk, because proximate writes (or, for that
matter, reads) aren't particularly more efficient than random
ones. The block size really only comes to play when the native
block gets re-written, which is handled internally by the device
controller -- and we really don't have much insight into the
algorithms it uses.
> So.... When installing FreeBSD onto an SSD, would one be well advised
> to perform all newfs operations with an explicit "-f 131072" option?
Probably not, unless the vast majority of your files are multiple
megabytes in size. And the difference still won't be in read or
More information about the freebsd-questions