Use it when configuring, checking or troubleshooting Recordsize in ZFS.
Recordsize
Recordsize is a per-filesystem-dataset property used when ZFS forms data blocks for files; it is not a fixed physical sector size and can vary for tail blocks or workload behavior. Changing the property affects newly written or rewritten data rather than magically rewriting every existing block. Workload alignment should be reasoned together with application I/O, compression and underlying vdev geometry.
1. recordsize = maximum block size for files (default 128K).
2. Large (1M) for media/backups; small (8–16K) for DB pages.
3. Only affects new writes.
4. Mismatch causes read-modify-write amplification.
5. Zvols use volblocksize instead.
file write → records of up to recordsize
Context & applicabilityCommon mistakes · platform/version boundaries
An effective recordsize value shows the property used for future applicable file-block creation, but it does not show existing data uses that size or that the setting is optimal.
Suspicious evidence: recordsize is confused with physical sector size or volblocksize, property changes are assumed to rewrite old data, or cache-warmed benchmarks are used as sole tuning evidence.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
application write → dataset record formation → compression/checksum → pool allocation → vdev I/O → application read-back
Healthy evidence: effective recordsize is deliberate for the workload, rewritten representative data shows expected latency/compression/amplification, and no regression appears in the original workload.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Recordsize ≠ disk sector size.
- Recordsize ≠ zvol volblocksize.
- Changing recordsize ≠ immediate rewrite of existing file blocks.
- Larger recordsize ≠ automatically better throughput for every workload.
zfs get recordsize <ds>— currentzfs set recordsize=1M <pool>/media— large fileszfs set recordsize=16K <pool>/db— databases
ReferenceImportant terms & boundaries2 sections · depth on demand
Topology
An effective recordsize value shows the property used for future applicable file-block creation, but it does not show existing data uses that size or that the setting is optimal.
Recordsize owns filesystem-dataset data block sizing. Zvol owns volblocksize; Ashift owns minimum vdev sector alignment; Storage Performance owns benchmark methodology.
In depth
recordsize is the maximum block size for files in a dataset (default 128K). ZFS reads, checksums and compresses whole records, so a mismatch between recordsize and the application's I/O size causes read/write amplification.
| Workload | Recordsize |
|---|---|
| PostgreSQL | 8K–16K (often 16K with compression) |
| MySQL InnoDB | 16K |
| VM images as files (qcow2/raw) | 64K (match cluster size) |
| General files | 128K |
| Media, backups, archives | 1M |
Changing recordsize affects only newly written data. Small files are always stored in a single block of their own size, so recordsize mainly matters for large files with partial updates.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in ZFS → Recordsize. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://openzfs.github.io/openzfs-docs/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
ZFS → Recordsize ZFS map
Fast topology, capacity, integrity and proof boundaries for ZFS → Recordsize.
| ZFS boundary | What to verify | Proof limit |
|---|---|---|
| Identity / topology | Pool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective properties | Object presence alone does not prove integrity, performance or recovery |
| Capacity / protection | Pool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver state | Free space or ONLINE state at one layer does not prove end-to-end health |
| Failure boundary | An effective recordsize value proves the property used for future applicable file-block creation; it does not prove existing data uses that size or that the setting is optimal. | Correlate ZFS evidence with both workload and lower device/path evidence |
| Acceptance | Healthy evidence: effective recordsize is deliberate for the workload, rewritten representative data shows expected latency/compression/amplification, and no regression appears in the original workload. | Close only after original workload plus checksum/read-back/recovery verification succeeds |