Article View: comp.sys.mac
Article #41448Mac II I/O rates vs. block size
From: Ephraim Vishniac
Date: Wed, 26 Apr 1989 20:54
Date: Wed, 26 Apr 1989 20:54
36 lines
1965 bytes
1965 bytes
Several months ago, Ed Darken reported that he'd written a simple
program to check the Mac's I/O speed and found it execrable,
independent of I/O block size. Ed was kind enough to send me his
code, and I've finally gotten around to investigating his results.
Alas, I've lost his net address in the meantime, but I thought the
explanation might be of general interest.
Ed's program pre-allocated a file on disk, then did a series of writes
to the file. That is, he did PBCreate, PBOpen, PBAllocate, a series
of FSWrites, and a PBClose. Output rates were terrible, down around
25kB/S on a Mac II with a hard disk. Varying the block size on the
FSWrites didn't seem to help at all.
Guessing that FSWrite was doing a series of single-sector writes, I
modified Ed's program to use PBWrite instead, and I got the following
results:
Block size Output rate (k Bytes / Second)
512 26.3
1024 51.7
1536 60.8
2048 93.8
4096 142.9
8192 177.8
16384 206.9
Plainly, FSWrite has serious brain damage. Fortunately, substituting
PBWrite is trivial and yields large improvements for larger block
sizes.
Ephraim Vishniac / Internet: ephraim@think.com / AppleLink: ThinkingCorp
Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142-1214
"Arlo Guthrie, it seems, has found what he was looking for:
God, and the Macintosh." (Boston Globe)
Technical Details
Message-ID:
<39736@think.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!think!ephraimShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!think!ephraim From: ephraim@think.COM (Ephraim Vishniac) Newsgroups: comp.sys.mac Subject: Mac II I/O rates vs. block size Message-ID: <39736@think.UUCP> Date: 26 Apr 89 20:54:48 GMT Sender: news@think.UUCP Reply-To: ephraim@think.COM (Ephraim Vishniac) Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 36