Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!ames!oliveb!sun!cmcmanis From: cmcmanis@sun.uucp (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: Disk timings.... Message-ID: <17956@sun.uucp> Date: Mon, 4-May-87 13:38:46 EDT Article-I.D.: sun.17956 Posted: Mon May 4 13:38:46 1987 Date-Received: Tue, 5-May-87 04:47:51 EDT References: <3406@jade.BERKELEY.EDU> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 36 Summary: Hashing is a big win here In article <3406@jade.BERKELEY.EDU>, (Mike (My watch has windows) Meyer) writes: > Those who doubt that AmigaDOS does good things for finding files vs. > the Unix file system might check out the file creations/deletions #'s > vs. raw throughput. Now, if someone could explain why scanning a > directory is so mach faster relative to the raw disk speed on > AmigaDOS, I'd appreciate it. Numbers of opens/sec would be > interesting. I may hack the diskperf program to do that. I think you will find that ADOS is incredibly fast at opening *named* files. Because of the hashing scheme and the fairly large hash tables (76 entries in 512 byte blocks). Consequently opening a file usually takes only 2 reads in most cases (the directory block and the file header) with digressions to 3 and sometimes 4 reads when the directory is *really* loaded. DiskPerf's code for checking the 'scan' rate looks like : /* ** Time open scan of directory. */ timer(0); numRead = 1; for(i = 0; i < SCAN_ITER; i++) for(j = 0; j < OPEN_TEST_FILES; j++) if(OpenStat(tempname[i]) != 0) numRead++; timer(&sDt); Where OpenStat just gets a Lock on a filename and does an Examine on that lock. This wins because of the hashing. There is very little scanning, and a lot of jump right to the file you want. Unfortunately optimizing for speed of the 'Dir' command actually hurts lookup time. -- --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These views are my own and no one elses. They could be yours too, just call MrgCop() and then ReThinkonrge Robbr