Path: 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 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)