Raw disk I/O

Larry McVoy lm at snafu.Sun.COM
Fri Feb 16 18:05:24 AEST 1990


In article <1990Feb15.212708.19046 at ladc.bull.com> fmayhar at hermes.ladc.bull.com writes:
>In article <MARC.90Feb14083116 at focsys.uucp>, marc at focsys.uucp (Marc H.
>Morin) writes:
>> I am investigating using the raw disk interface to increase performance
>> of our application. The application is an imaging system,  thus the I/O
>> consists of large data transfers to and from the disk.
>We were looking into this as well.  After testing, we decided to
>continue to use
>the block device, since it was at least three times faster than the raw device.
>I concluded then that the block device was doing some disk access optimizations
>that the raw device wasn't doing.  Also, using the block device has the added
>advantage that any new optimizations in the driver would automatically be used
>by the application.

Under SunOS, at least, the raw device doesn't do read ahead.  Some applications
consider this a feature, others a bug.  To prove this, try

$ /bin/time dd if=/dev/rsd0a of=/dev/null bs=8k
$ /bin/time dd if=/dev/sd0a of=/dev/null bs=8k
---
What I say is my opinion.  I am not paid to speak for Sun, I'm paid to hack.
    Besides, I frequently read news when I'm drjhgunghc, err, um, drunk.
Larry McVoy, Sun Microsystems     (415) 336-7627       ...!sun!lm or lm at sun.com



More information about the Comp.unix.wizards mailing list