IO chunking
Pokala, Ravi
rpokala at panasas.com
Tue Aug 12 09:54:30 UTC 2014
Hi folks,
I'm doing moderately-large block IO (16KB - 1MB) directly against drive
devices (i.e. /dev/adaX), and I see that `iostat -d adaX' reports a
transaction size of at most 128KB. I believe this is because transactions
are limited to at most MAXPHYS bytes (128KB), and requests larger than
that are broken into smaller chunks; is that correct? If so, where does
that chunking happen? In low-level GEOM code (geom_io.c, geom_dev.c)? In
CAM? In the drive device driver? In VFS?
The context here is that I'm doing some testing in multiples of the
drive's logical sector size. At low LBAs, SATA allows up to 256 sectors
per command; (256 sectors) * (512B / sector) = 128KB == MAXPHYS, so we can
reach maximum sector counts w/o chunking on 512n or AF-512e drives.
However, on AF-4Kn drives, (128KB / txn) * (sector / 4KB) = (32 sectors /
txn), so chunking happens well before maxing out the SATA command (256
sectors).
Any pointers?
Thanks,
Ravi
More information about the freebsd-hackers
mailing list