haugj@pigs.UUCP (Joe Bob Willie) (08/24/88)
In article <31819@clyde.ATT.COM> feg@clyde.ATT.COM (Forrest Gehrke) writes: >Leonard: Please email me on method of converting revolutions per > track to interleave ratio (unless you have other requests, > in which case post to c.b.i.p.d.) >-- >Forrest Gehrke there is no direct method for converting revolutions per track to an interleave value. the easiest method is direct evaluation. the code goes like this: for interleave := 1 to number of sectors do pretend to use `interleave' interleave factor save results of timing test in an array do find fastest interleave or, the mathematical approach. if you know how long it takes to process a disk block, issue the next request and transfer a sector, this information can be converted directly into an interleave value given the speed of the disk. multiply revolutions per second (should be about 60) by number of seconds per request. that number give number of revolutions per request, and should be a fractional number for most reasonable machines. multiply that number by the number of sectors (and then do the modulo number of sectors if need be). the ceil() of that number is your interleave. for those of you who are swift of brain you will notice it is dependent on cpu speed as well as controller and disk speed. here's an example: processing time: 0.001000 setup time: 0.000050 transfer time: 0.000980 total time: 0.002030 seconds per block revolutions / request: 60 * 0.002030 = 0.1218 sectors: 17 sectors / request: 2.0706 interleave: 3 note also that if you are doing complex processing on each block of data (say, a database) that increasing the interleave will increase your performance. disclaimer: your milage may vary. operating systems which perform read-ahead work differently since the processing is overlapped with the (hopefully DMA) disk transfer to some degree. this is just an example. and so on ... -- jfh@rpp386.uucp (The Beach Bum at The Big "D" Home for Wayward Hackers) "Never attribute to malice what is adequately explained by stupidity" -- Hanlon's Razor