[rescue] Drive speed test

Jonathan Katz jon at jonworld.com
Tue Mar 15 13:47:28 CDT 2016

On Tue, Mar 15, 2016 at 7:44 PM, CLIFFORD HAIGHT <klemish at hotmail.com> wrote:
> so how accurate are the values if I do
> time sh -c "dd if=/dev/null of=/tmp/tempfile bs=1024 count=10240"
> then
> time sh -c "dd if=/tmp/tempfile of=/dev/null bs=1024 count=10240"

Solaris and most Unix systems will cache the IO writes in RAM before
flushing them to the disk. Your "dd" writes aren't fully atomic until
the kernel flushes the disk write cache. Plus, if you're reading from
the same file, it's probably still cached in RAM and the read isn't
fully from the spindle. That will account for your
faster-than-SCSI-bus IO times.

With Solaris the trick would be to use "directio" mounting, which
automatically flushes the buffer with each write (it disables the
kernel disk write cache.) This didn't exist in SunOS 4, IIRC.

More information about the rescue mailing list