SRAW(8)
π SRAW β the raw SCSI I/O benchmark, bestie edition
okay so first things first: this is sraw(8), a System Manager's Manual page, and it's about benchmarking raw SCSI I/O performance under Linux. yes it's from Nov 1993 and yes it still eats. let's get into it π«Ά
β¨ NAME β¨
sraw β benchmark raw scsi I/O performance under linux
πΈ SYNOPSIS πΈ
sraw [ -fiv6 ] scsi-device [ bstart [ bstep ] ]
π¦ DESCRIPTION π¦
okay so basically this program reads the scsi device you point it at and measures the throughput. that's the whole vibe. and listen β the filesystem AND the buffer cache are bypassed by this code, like completely ghosted. this program was literally designed to benchmark the naked scsi drivers by themselves, without having to account for the overhead of any other portion of the kernel. lowkey iconic. it also could be used to benchmark disk read throughput, which, sure, bonus.
here's the flow: the program does a series of reads of the disk, over consecutive areas on the disk. first it queries the device to figure out the sector size for that device, and then the series of reads begins. about 5.0 Mb gets read from the device, and then the performance numbers are reported. and because the buffer cache is completely bypassed, you do not have to be concerned about cache hits or anything like that. no thoughts, no cache, head empty, just raw reads π
the output of sraw is a set of lines, 4 numbers per line: blocksize, elapsed time, nblocks and throughput (in bytes per second). slay.
scsi-device is either a block device (e.g. /dev/sda, /dev/scd0) or a generic SCSI device (e.g. /dev/sg0).
π OPTIONS π
-fβ set the FUA (Force Unit Access) bit during read. so the data is then read from media instead of the internal drive cache. no shortcuts, no lies, we go straight to the source β¨-iβ use the legacy ioctl instead of the new SG I/O layer. heads up bestie, this will not work on 2.6 kernel and block devices. it's giving retro, it's giving deprecated-ish, know what you're doing π-vβ more verbose output. give me all the lore π£οΈ-6β use a 6-bytes read command instead of a 10-bytes read command. in this case, only the first1 GBof data could be read from media. so like, a limited edition read. plan accordingly.- bstart β starting block, for checking different zones on ZBR discs.
- bstep β factor for sequential stepping, default
1. use0for reading always the same blocks (from cache).
π ERRORS π
srawcould issue input/output errors when reading too many blocks at the same time from a block device like/dev/sda. to get rid of them, use/dev/sgNinstead.
like, that's it, that's the fix. the block device is being dramatic, the generic SCSI device is not. switch and thrive π§
π AUTHOR π
sraw was first written by Eric Youngdale. the extensions (-v, -f, -6, SG IO, man page) were written by Eric Delaunay. two Erics, one legend. we stan π
π₯ SEE ALSO π₯
sg_dd(8)from thesg3-utilspackage.
π AVAILABILITY π
sraw is available at:
ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/
okay that's the whole page, you're fully caught up, go benchmark something responsibly β¨
this little number comes from the System Manager's Manual, dated Nov 1993 β vintage but make it feral π
π¦ where this page comes from
- debian bookworm: scsitools 0.12-4
- debian trixie: scsitools 0.12-6
- ubuntu jammy: scsitools 0.12-3ubuntu1
- ubuntu noble: scsitools 0.12-4ubuntu1
- ubuntu questing: scsitools 0.13
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms