Rogier Wolff wrote:
>
> Douglas Gilbert wrote:
> > $ time sg_dd if=/dev/sg0 of=/dev/null bs=512 skip=0 count=200k
> > real 0m2.542s
>
> I always use "bs=1024k count=100". This eliminates more of the
> system-call overhead (I hope...)
Roger,
That was sg_dd I was using (my own routine from sg_utils), not
dd. In the case of sg_dd, the "bs" argument _must_ be equal to
the physical block size of the device which in this case is
512 bytes.
The sg_dd command controls the number of SCSI commands called
via its blocks_per_transfer "bpt" argument. The default value
is 128. Hence that sg_dd command would send 1600
(200 * 1024 / 128) scsi commands (READ 10), each reading 128
blocks (64 KB) for a total of 100 MB read.
With sg_dd I was more interested in controlling the exact
number of scsi commands issued. It is still reasonable
to assume that the scsi command overhead is greater than
the system call overhead. [Ultra 320 may make the difference
smaller.] Using the sg driver, for each scsi command issued
there are either 2 system calls [write() then read()] or
1 system call [ ioctl(sg_fd, SG_IO, ) ].
This example reading 256 KB per scsi command gives similar
performance:
$ time sg_dd if=/dev/sg0 of=/dev/null bs=512 skip=0 count=200k bpt=512
real 0m2.546s
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]