Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sraw(8) [debian man page]

SRAW(8) 						      System Manager's Manual							   SRAW(8)

NAME
sraw - benchmark raw scsi I/O performance under linux SYNOPSIS
sraw [ -fiv6 ] scsi-device [ bstart [ bstep ] ] DESCRIPTION
This program basically reads the specified scsi device and measures the throughput. Note that the filesystem *AND* the buffer cache are bypassed by this code, this program was designed to benchmark the naked scsi drivers by themselves without the need to account for the overhead of any other portion of the kernel. It also could be used to benchmark disk read throughput. This program does a series of reads of the disk, of consecutive areas on the disk. The device is first queried to determine the sector size for the device, and then the series of reads is begun. About 5.0 Mb is read from the device, and then the performance numbers are reported. Note that since the buffer cache is completely bypassed, there is no need to be concerned about cache hits or anything. Output of sraw is a set of lines, 4 numbers per line: blocksize, elapsed time, nblocks and throughput (in bytes per second). 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 FUA (Force Unit Access) bit during read. Data is then read from media instead of internal drive cache. -i use legacy ioctl instead of new SG I/O layer (will not work on 2.6 kernel and block devices). -v more verbose output. -6 use 6-bytes instead of 10-bytes read command. In this case, only the first GB of data could be read from media. bstart starting block to check different zones on ZBR discs bstep factor for sequential stepping, default 1. Use 0 for reading always the same blocks (from cache) ERRORS
sraw could 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/sgN instead. AUTHOR
sraw was first written by Eric Youngdale. Extensions (-v, -f, -6, SG IO, man page) were written by Eric Delaunay. SEE ALSO
sg_dd(8) from sg3-utils package. AVAILABILITY
sraw is available at ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/ Nov 1993 SRAW(8)

Check Out this Related Man Page

RAW(8)							       System Administration							    RAW(8)

NAME
raw - bind a Linux raw character device SYNOPSIS
raw /dev/raw/raw<N> <major> <minor> raw /dev/raw/raw<N> /dev/<blockdev> raw -q /dev/raw/raw<N> raw -qa DESCRIPTION
raw is used to bind a Linux raw character device to a block device. Any block device may be used: at the time of binding, the device driver does not even have to be accessible (it may be loaded on demand as a kernel module later). raw is used in two modes: it either sets raw device bindings, or it queries existing bindings. When setting a raw device, /dev/raw/raw<N> is the device name of an existing raw device node in the filesystem. The block device to which it is to be bound can be specified either in terms of its major and minor device numbers, or as a path name /dev/<blockdev> to an existing block device file. The bindings already in existence can be queried with the -q option, which is used either with a raw device filename to query that one device, or with the -a option to query all bound raw devices. Unbinding can be done by specifying major and minor 0. Once bound to a block device, a raw device can be opened, read and written, just like the block device it is bound to. However, the raw device does not behave exactly like the block device. In particular, access to the raw device bypasses the kernel's block buffer cache entirely: all I/O is done directly to and from the address space of the process performing the I/O. If the underlying block device driver can support DMA, then no data copying at all is required to complete the I/O. Because raw I/O involves direct hardware access to a process's memory, a few extra restrictions must be observed. All I/Os must be cor- rectly aligned in memory and on disk: they must start at a sector offset on disk, they must be an exact number of sectors long, and the data buffer in virtual memory must also be aligned to a multiple of the sector size. The sector size is 512 bytes for most devices. OPTIONS
-q Set query mode. raw will query an existing binding instead of setting a new one. -a With -q , specify that all bound raw devices should be queried. -h Provide a usage summary. BUGS
The Linux dd(1) command should be used without the bs= option, or the blocksize needs to be a multiple of the sector size of the device (512 bytes usually), otherwise it will fail with "Invalid Argument" messages (EINVAL). Raw I/O devices do not maintain cache coherency with the Linux block device buffer cache. If you use raw I/O to overwrite data already in the buffer cache, the buffer cache will no longer correspond to the contents of the actual storage device underneath. This is deliberate, but is regarded either a bug or a feature depending on who you ask! AUTHOR
Stephen Tweedie (sct@redhat.com) AVAILABILITY
The raw command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux August 1999 RAW(8)
Man Page