Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!wam.UMD.EDU!russotto From: russotto@wam.UMD.EDU Newsgroups: comp.sys.mac Subject: Re: Mac II I/O rates vs. block size Message-ID: <8904270059.AA02169@vs08csc.UMD.EDU> Date: 27 Apr 89 00:59:36 GMT References: <39736@think.UUCP> Organization: University of Maryland, College Park Lines: 50 In article <39736@think.UUCP> ephraim@think.COM (Ephraim Vishniac) writes: > >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) Since FSWrite is development-system-dependant, could you please tell us which development system was used? (I've written several of those routines to replace the horrible Megamax C routines, and I don't see how one could mess them up that badly... Well, Megamax could... but I use MPW now) -- DISCLAIMER: Not only does the University not share my opinions, they don't want me sharing my opinions. "This 'Pnews', what does it do?" Matthew T. Russotto russotto@wam.umd.edu