Some questions about A/UX

Phil Ronzone phil at Apple.COM
Wed Nov 2 08:22:45 AEST 1988


In article <964 at ccnysci.UUCP> alexis at ccnysci.UUCP (Alexis Rosen) writes:
>That said, I still have some questions. The Mac can transfer a 1KByte block in
>280 usecs. That's fine, but it's not the whole story. If it were, it could do
>about 3.5 MBytes/sec. In fact, it can do less than one tenth of that speed. So
>what causes that discrepancy? My guess (uneducated, so please correct me if I'm
>wrong) is that it's the overhead for transferring that block. Can the Mac
>transfer 10 or 100 blocks in 2800 or 28000 microseconds? I don't think so.
>So again, what am I missing?

DMA is merely a hardware assist for transferring data from the (typically and
hopefully) buffered SCSI device, such as a hard disk, into the Mac system
memory.

To do this, the hard disk is instructed to read/write "N" blocks of
data starting at a certain address. For example, opening a thousand
1 block files, each of which is located near the end of a slower hard disk,
could, in ABSOLUTE worst case, can take as follows:
     1000 seeks to front of the disk to read the inode
     and then go back to near the end of the disk to read one 1K block
     = 60ms * 1000 = 60 secs = about 16KB per second!!!!

Rememberm that hard disk is getting more or less 40 - 100 requests for
blocks per second under load - and each block has a more or less random
block address in UNIX (to oversimplify it).

On the other hand, a SCSI device that is actually 16M (16 megabytes!) of
cache in the SCSI adapter (to ESDI) gave up to 400K/s data transfer rates.
You could write at even higher rates, but every 1 or 2 seconds it hit
an internal count of "writes pending" and accepted no more I/O until ALL
the writes were flushed. So you had 2-3 seconds of immense data transfer,
no matter how much "seeking" was implied, then 2 - 3 seconds of NO data
transfer while the device flushed.

So DMA (or "PIO") is but a small part of the equation for disk throughput.
Consider interleave, disk seek, average bytes per transfer, "randomness"
and so on.
+------------------------+-----------------------+----------------------------+
| Philip K. Ronzone      | A/UX System Architect | APPLELINK: RONZONE1        |
| Apple Computer MS 27AJ +-----------------------+----------------------------+
| 10500 N. DeAnza Blvd.  | If you post a bug to the net, and the manufacturer |
| Cupertino CA 95014     | doesn't read it,does that mean it doesn't exist?   |
+------------------------+----------------------------------------------------+
|{amdahl,decwrl,sun,voder,nsc,mtxinu,dual,unisoft}!apple!phil                 |
+-----------------------------------------------------------------------------+



More information about the Comp.unix.aux mailing list