Raw disk I/O (Performance on NeXT OD)

jiro at heights.cit.cornell.edu jiro at heights.cit.cornell.edu
Sun Feb 18 12:25:33 AEST 1990


>>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
>---
>Larry McVoy, Sun Microsystems     (415) 336-7627       ...!sun!lm or lm at sun.com


   On the NeXT with a floptical, the two above commands reveal interesting
times:
csh> /bin/time dd if=/dev/od0a of=/dev/null bs=8k	<-- Block floptical
30492 Records                                     	<-- 240 megabytes
4188.9 real  1.8 user  2927.7 sys
                       ^^^^^^

csh> /bin/time dd if=/dev/rod0a of=/dev/null bs=8k	<-- Raw floptical
30492 Records
1320.9 real  2.0 user  51.2 sys              
                       ^^^^ 

 On the NeXT, the raw device is overwhelmingly faster than the block
device. What is this supposed to mean?  Any relationship to the disk
being an Optical?

   - Jiro Nakamura -
    NeXT Developer (Unregistered, Independent)

----------------------------------------------------------------
jiro at heights.cit.cornell.edu    Disclaimer: I work for no-one.



More information about the Comp.unix.wizards mailing list