Pcornel
Storage · Storage Performance

Block Size

Cheat sheet · https://pcornel.dk/topic.php?topic=3864

Back to the Topic

Answer

For a given IOPS rate, larger requests transfer more bytes; for a fixed bandwidth, smaller requests require more operations. Application I/O size may be transformed by filesystem, cache, RAID stripe, storage protocol and device internals, so logical and backend sizes can differ.

Remember

  • Block size ≠ filesystem allocation unit in every context.
  • Application request size ≠ backend media write size.
  • Larger blocks do not universally improve performance; they can increase latency and unnecessary transfer for small accesses.
  • IOPS comparisons without equal block size are misleading.

First checks

  • iostat -x 1 (rareq-sz, wareq-sz) — average request size
  • fio --bs=8k ... — test with app block size
  • zfs get recordsize / volblocksize — ZFS block size

Verify in this order

app I/O size → filesystem block → device

Where it usually breaks

First mismatch in workload → filesystem/volume → queue/cache → path/protocol → controller/pool → media/backend → observed completion; preserve identity/pre-state before mutation.

Storage Performance → Block Size performance map

Measure/boundaryWhat to readProof limit
Workload shapeBlock size, random/sequential pattern, read/write mix, concurrency and working setWithout workload shape, performance metrics are not comparable
Service rateIOPS and throughput at the same time windowHigh service rate does not prove low latency or efficiency
Delay/queueingAverage plus tail latency and outstanding queue depthA spike identifies pressure, not automatically root cause
AcceptanceRepresentative workload meets its latency/throughput objective in steady stateRequired to close the performance investigation

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3864

Confirmation

Confirm action

Continue?