From: jbass@igor.tamri.com (John Bass)
Subject: Re: Disk performance issues, was IDE vs SCSI-2 using iozone
Organization: TOSHIBA America MRI, South San Francisco, CA
Date: Wed, 11 Nov 92 21:07:49 GMT


>>Given small transfers qualification, "Slight margin in speed" is highly
>>debatable .... The ability to do read scheduling and write placement
>>based upon knowing geometry and current head/spindle position allows for
>>30%-700% better semi-random small file I/O with the right filesystem design.
>>The SCSI abstraction hides this important performance information.
>
>I don't understand what you're saying here.

Take the following track layout, where each group is a cyl of 5 heads, and
the current head position is on the second group, shown as wraparound linear:
(Req is queued request, Free is free block, Last is just completed request)

Blocks 0    1    2    3    4    5    6    7    8    9   10   11   12   13   14

cyl/head
10/0 ____ ____ Free ____ ____ Free ____ ____ Req_ ____ ____ ____ ____ ____ ____ 
10/1 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 
10/2 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 
10/3 ____ ____ ____ ____ Req_ ____ ____ ____ Free ____ ____ ____ ____ ____ ____ 
10/4 ____ ____ ____ ____ ____ ____ Free Free ____ ____ ____ ____ ____ ____ ____ 

11/0 ____ ____ ____ ____ ____ ____ ____ ____ Free ____ Free Free Free ____ ____ 
11/1 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 
11/2 ____ ____ ____ ____ ____ ____ Req_ ____ ____ ____ ____ ____ ____ ____ ____ 
11/3 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ Free Free Free ____ ____ 
11/4 Last ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 

12/0 ____ Req_ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 
12/1 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ Free Free ____ 
12/2 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 
12/3 ____ ____ ____ ____ Free Free Free Free Free Free Free Free Free ____ Req_ 
12/4 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 

13/0 ____ ____ ____ ____ Free ____ ____ ____ ____ ____ ____ ____ Req_ ____ ____ 
13/1 ____ ____ Req_ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 
13/2 ____ ____ ____ ____ Free Free Free Free ____ ____ ____ ____ ____ ____ ____ 
13/3 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ 
13/4 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ Req_ ____ Free Free ____ 


Now lets assume this is a 2k logical, over 4X512 physical sectoring, 64 per
track at 3600 rpm, controller does pass-thru buffering, and we just took a
completion interrupt for 11/4/0 (Last).  Logical Sector times are 1.11ms, and
Short Track (1-3) seeks are under 1.00ms with no settling time (not a stepper).

Common wisdom would be to service with C-SCAN, as 12/0/1, 12/3/14, 13/0/12,
13/1/2, 13/4/10, 10/0/8, 10/3/4, and 11/2/6 consuming 5.5 revs and 91ms.

With a rotationally sensitive filesystem and driver, minimal service time
would be the path 13/1/2, 10/3/4, 11/2/6, 10/0/8, 13/4/10, 13/0/12, 12/3/14,
then 12/0/1 as 1.2 revs and 20ms.

In addition, if the filesystem were then presented with storing a 9K
file it would use 12/3/4 to 12/3/12 (best fit nearest active region).
A big win over using 10/0/[2,5,8], 10/3/[4,8], 10/4/6-7, and 11/0/8 as
convential filesystem with a bitmap would tend to allocate.

>All the new high performance IDE drives I've seen are zoned, and "hide" the
>actual geometry. Perhaps there's a way in IDE to ask the drive for the true
>geometry, but my understanding is that SCSI allows this as well.
>
>How is IDE better?

I think that zoned recording is great ... and geometry hiding is bad.
Most zoned drives do not CURRENTLY allow for the option of turning
off the mapping.  If more filesystems and drivers used positional clues
and could handle variable track lengths, it would be a minor firmware
issue to have a direct mode. I don't see this as a significant problem,
certainly any mfgr could spec such a requirement as part of purchase at
near zero cost per unit.

IDE drives should support the WD1010 SCAN_ID command allowing the driver
locate current head position ... no such SCSI feature exists. In addition
it would be very desirable to have IDE drives continuously update the current
sector number -- ala the 1973 DEC RP05 RPS feature. (Who remembers doing
RPS drivers for V6/V7 PDP11 UNIX? ... come on guys this is OLD technology
that REALLY WORKS! ... cheap is OK, cheap and FAST is BETTER!)

Additional issues are control of sector skewing to facilitate head/cyl
switching and group/request interleave factors ... Low Level format ability is
very important when the drive makes the wrong choices as defaults ... again
any volume system vendor can request optimal layouts at minimal per unit costs.

Given 1974-1986 hardware, most of the current filesystem design issues
were correct .... to just OK. Given 1992-1995 hardware, the same tradeoffs
are mostly WRONG. Performance comes by DESIGN, not tuning, selection, or
non-reflective evolution. Too much performance engineering is making do with
existing poor designs ...  instead of designing how it should be.

"Mechanical" Design Approaches ... vs ... Creative Critical Thinking.

I make my living re-evaluating other peoples past design decisions with
today's constraints ... most people learn/remember only the solutions (how's)
...  it's much more important to learn/explore the issues (why's)!
Asking WHY is too often a reason to get fired, instead of promoted.

The real difference between Tech's and Engr's ... ignoring what might be
on someones business card or door plaque ... is critical thinking!


John Bass, Sr. Engineer, DMS Design			      (415) 615-6706
UNIX Consultant			 Development, Porting, Performance by Design
Newsgroups: comp.benchmarks