[comp.unix.aux] mkfs and 80SC interleaving

coolidge@m.cs.uiuc.edu (05/17/89)

We've got several Apple 80SC's (external and internal) used for A/UX
in our lab. Recently we set up one of the Macs as an NFS server for
the rest of them and reformatted a previously MacOS drive as a second
A/UX drive. The new drive's performance seems to be really bad, and it
seems to be doing far too much seeking. I suspect that by using the m
and n (interleaving) parameters with mkfs the performance could be
greatly improved.

Does anyone know the "right" interleaving numbers for an internal (or,
for that matter, an external) 80SC, especially one used mostly as
an NFS-mounted server drive?

 --------------------------------------------------------------------------
| John L. Coolidge                           Internet:coolidge@cs.uiuc.edu |
| UIUC Department of Computer Science           UUCP:coolidge@uiucdcs.uucp |
| Except material included, all above opinions mine. All e-mail answered   |
 --------------------------------------------------------------------------

dwells@Apple.COM (Dave Wells) (05/17/89)

In article <42900002@m.cs.uiuc.edu> coolidge@m.cs.uiuc.edu writes:
>
>We've got several Apple 80SC's (external and internal) used for A/UX
>in our lab. Recently we set up one of the Macs as an NFS server for
>the rest of them and reformatted a previously MacOS drive as a second
>A/UX drive. The new drive's performance seems to be really bad, and it
>seems to be doing far too much seeking. I suspect that by using the m
>and n (interleaving) parameters with mkfs the performance could be
>greatly improved.
>
>Does anyone know the "right" interleaving numbers for an internal (or,
>for that matter, an external) 80SC, especially one used mostly as
>an NFS-mounted server drive?

There are several things that can affect your hard drive performance.
From top to bottom: (or bottom to top, if you like.)

o What interleave was it formatted with.  Did you originally initialize
  it with HD SC Setup on a Plus or SE?  That'd hurt (not much, but some).
o When you used mkfs to create your file systems, did you allow it to
  use the defaults?  If so that'd hurt lots.  As is documented, the
  defaults are 7 for the gap and 400 for the "modulo operator."  A gap
  of 1, 2 or 3 will produce very similar results while 7 is like
  pouring molasses into the drive.  After talking to bunches of people
  I've discovered that few know much about the thing called the
  "modulo operator."  What I'm pretty sure you should use is the
  cylinder size (in blocks).  For a good (?) old ST225 with 4 heads
  and 17 sectors per track that'd be 68.  (4*17)  The quantum drives
  I think are different in that they don't have a fixed number of
  sectors per track.  They start at 28 in the center and end up
  with 35 at the outermost tracks.  With 5 heads this works out to
  either 140 or 175.  In testing I couldn't find much difference
  in timings, but I don't know if this would change with heavy
  usage (fragmentation).  Try a gap of 1 and modulo of 140.  See if
  that helps any.
o Do you have enough NBUFs?  Is the system being used heavily now so
  that all drive accesses seem slower or are just the new drives dogs?

Hope this helps.

-Dave

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
           Dave Wells, Apple Computer, Inc.  MS: 37-O  (408) 974-5515
        Internet: dwells@apple.com or AppleLink d.wells or GEnie D.WELLS
 These opinions may be nothing more than the ramblings of a fatigued tinkerer
                         -=-=-=-=-=-=-=-=-=-=-=-=-
 There's one big difference between genius and stupidity.  Genius has limits.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

paul@taniwha.UUCP (Paul Campbell) (05/18/89)

In article <30891@apple.Apple.COM> dwells@Apple.COM (Dave Wells) writes:
>In article <42900002@m.cs.uiuc.edu> coolidge@m.cs.uiuc.edu writes:
>>
>>seems to be doing far too much seeking. I suspect that by using the m
>>and n (interleaving) parameters with mkfs the performance could be
>>greatly improved.
>>
>o What interleave was it formatted with.  Did you originally initialize
>  it with HD SC Setup on a Plus or SE?  That'd hurt (not much, but some).

actually this is important if you use mkfs for 1k blocks (rather than mkfs1b
for 512 byte blocks) because you have to always wait for the latency

>o When you used mkfs to create your file systems, did you allow it to
>  use the defaults?  If so that'd hurt lots.  As is documented, the
>  defaults are 7 for the gap and 400 for the "modulo operator."  A gap
>  of 1, 2 or 3 will produce very similar results while 7 is like
>  pouring molasses into the drive.  After talking to bunches of people

yes and one way to fix an existing drive is simply to 'fsck -S' to
rebuild the free list so that future files get laid down in the
right places (it's a good idea to do this every few weeks on any System V
anyway).

Also do you have multiple active partitions on the same disk? the
heads could be bouncing backwards and forwards between them

	hope this helps

	Paul

-- 
Paul Campbell
Taniwha Systems Design			UUCP:		..!mtxinu!taniwha!paul 
Oakland CA				AppleLink:	D3213
Achtung! Ve are from ze Interface Police! Ve vant to look und feel!

cander@unisoft.UUCP (Charles Anderson) (05/18/89)

From article <42900002@m.cs.uiuc.edu>, by coolidge@m.cs.uiuc.edu:
> Does anyone know the "right" interleaving numbers for an internal (or,
> for that matter, an external) 80SC, especially one used mostly as
> an NFS-mounted server drive?

From the 1.1 man page for mkfs:

             Note: The proper selection of the m and n
             parameters can improve disk efficiency.  Disks which
             have full or partial track buffering should specify an
             m and n of 1 and 1; m and n for other disks must be
             determined by trial and error, as the disk latency is
             related to rotational latency and to the speed of the
             central processing unit.

As the Q-280 (alias 80SC) has a "dual port 14K-byte FIFO data buffer"
(from the Q200 series OEM manual), it should be obvious to the casual
observer :-) that the m and n values should be 1 and 1.  I've tried
this and it really does work.  (the difference between 40K/sec and
140K/sec read throughput under 1.1)  It should also be noted that this
option is also available in fsck (-s1:1).  This re-orders the free list
to use the parameters specified.  I have observed that the free list
degrades with normal use and that "fsck -s" restores so it runs like
new.

-- 

Charles.
{sun, amdahl, ucbvax, pyramid, uunet}!unisoft!cander

ric@Apple.COM (Ric Urrutia) (05/19/89)

In article <42900002@m.cs.uiuc.edu> coolidge@m.cs.uiuc.edu writes:
>
>We've got several Apple 80SC's (external and internal) used for A/UX
>in our lab. Recently we set up one of the Macs as an NFS server for
>the rest of them and reformatted a previously MacOS drive as a second
>A/UX drive. The new drive's performance seems to be really bad, and it
>seems to be doing far too much seeking. I suspect that by using the m
>and n (interleaving) parameters with mkfs the performance could be
>greatly improved.
>
>Does anyone know the "right" interleaving numbers for an internal (or,
>for that matter, an external) 80SC, especially one used mostly as
>an NFS-mounted server drive?



The mkfs program defaults to an interleave of 7:400.  Reconstruct your
free list by issuing the command: fsck -s500:1 and your access time
will increase dramatically.  I ran some benchmarks on my macII and found
the writes to be about 8 times faster and the reads about 3 times faster.

By the way, the root partition comes delivered with the interleave factor
properly set up.  It's just additional partitions which must be created
with "mkfs /dev/dsk/c?d?s? ??000 1:500".