This means that reads and writes should be on 4KiB boundaries, and writes 
should be multiples of 4KiB, for optimal performance. As long as those criteria 
are met, there's no harm and some real benefits of reading and writing larger 
blocks than the minimum.

One example benefit, among several possible, is that the OS overhead of one 
single 1MiB write will be much less than 256 individual 4KiB writes. (number of 
system calls performed; overhead inside the OS of merging successive writes to 
optimize the size of actual disk transfers, etc...)

Hope that helps!
Rick

On Mon, Jun 8, 2020, at 9:47 PM, Matthew Campbell wrote:
> fdisk said the minimum and optimal access size for my hard drive was 4096 
> bytes.
> 
> name=Matthew%20Campbell&email=trenix25%40pm.me
> 
> 
> 
> 
> 
> -------- Original Message --------
> On Jun 8, 2020, 7:42 PM, Dan Ritter < d...@randomstring.org> wrote:
>> 

>> Jude DaShiell wrote:
>>  > Does any optimal formula exist based on hard drive size which minimizes
>>  > time needed for checking and blanking hard drives in connection with the
>>  > block size value?


>> If the disk firmware offers it, a SMART long read/verify test
>>  should be close to optimal. Consult smartctl and the disk manufacturer
>>  for details.


>> For conventional spinning hard disks, the optimal write size would be
>>  a complete cylinder at a time. That varies across the radius of the disk,
>>  and may not be made available to the OS.


>> In lieue of knowing that, writes which are reasonable integer
>>  multiples of the sector size are very good. 1 MB is probably
>>  good for most drives.


>> For SMR spinning disks,the optimal write size is one complete
>>  write zone. I've heard that this is standardizing at 256MB, but
>>  I would want to confirm with the manufacturer. There are a lot
>>  of interactions with PMR caches.


>> For SSD, writing wears out the storage mechanism. A write-all
>>  test won't test reliability; flaws will be detected and remapped
>>  without letting the host know.

>> -dsr-

Reply via email to