From: thompson@PAN.SSEC.HONEYWELL.COM (John Thompson)
Newsgroups: comp.sys.apollo
Subject: re: HPUX (generic Unix too) disk formatting
Date: 14 Apr 92 14:25:18 GMT
Distribution: world
Organization: The Internet


Well, I got two replies to my HPUX disk formatting posting.  I also played
around and found a way to squeeze out a bit more space.  Luckily, nothing
is contradictory in the replies or my findings!   :-)


Answers --
> 1. The disk performance degradation is more a result of the file system
> than the disk itself. It has to do with the way the fast file system
> allocates space for files. You will notice that Domain/OS, which uses
> a (highly reengineered) version of the fast file system also suffers
> from extreme performance hits when the disk is almost full.
Actually, I hadn;t noticed any problems running below 10% (or any value until
about 1-2 percent.  HP/Apollo cautioned me that the DN10000 likes to have
at least 5% free on disks, or it might crash and burn (one of their attempts
to solve what was a power supply problem (both machine and main electrical).

> You might consider lowering minfree, but it would not be good to make it 0, 
> because of the way Unix interprets minfree as a hard quota for non root users.
Actually, since this is a mounted volume rather than a bootable one, it wouldn't
be too catastrophic to lower it to 0.  However, the point is well taken.  Since
I try and keep disks semi-open anyway, I've lowered minfree to 2% (~10MB).

> 2. You generally do not mess up lying about SCSI disks. However, I've run into
> problems when not all disks are formatted consistently, so make sure every machine
> has the same /etc/disktab.
Verified by everyone I talked with.  The vendor also sent out an installation 
guide with the _2nd_ drive we bought :-( that said that it pretty much didn't
matter what numbers you put in, if #cylinders x #tracks(surfaces) x #sectors
did not exceed the total number of blocks.  They also stated that having a 
small number of cylinders decreased the O/S overhead to Xlate addresses, 
although it increased the granularity for setting aside swap-space (which 
is cylinder constrained).  Setting it too small made newfs croak on me, though.

> 3. The reason for the disk rotational speed is for head optimization, if the
> driver is smart enough to do it. Incidentally, the rortational speed is part
> of the BSD 4.3 Tahoe disk label.
Hmmmm.  That's neat, I guess.


Resolution:
I changed the sector/track/cylinder numbers to 42 sectors/track, 29 tracks, and
417 cylinders (still = 507906KB).  I also ignored SAM, and just used 'mediainit'
and 'newfs', since SAM apparently can't handle the customizations needed.  :-(
With these changes, newfs notified me that some space would be lost due to the
last group of cylinders being too small for the inode cluster + data.  SAM didn't
warn me of this, since it's not an error, just a warning.  I then ended up with
a still lousy 466 MB of space.  Poking around some more, I found that the default
expects each inode to only handle 2K of data!  Since we have larger files than
that, on average, I bumped the inode value to 4096 bytes.  I ended up with about
482 MB free, and no error with the last cylinder group.  I then bumped it to
8192, and got 489 MB free (499 total!) which is 'pretty good'.  Just for giggles,
I kept bumping it.  With an inode every 65536 bytes (64K avg file), I got an
additional ~6 MB.  Many inode values ended up wasting space at the end, however,
so I didn't go above the 8K value for the real system.  I suppose I could have
played around with the newfs argument for cylinders/group, and tuned it to
use all of the space with a higher byte/inode value, but you reach a point of
diminishing returns fairly quickly.

/etc/disktab entry:
    FUJITSU_2624FA_noswap:\
            :no swap or boot:ns#42:nt#29:nc#417:\
            :s0#507906:b0#8192:f0#1024:\
            :se#512:rm#4400:
Commands:
    /usr/bin/mediainit -v /dev/rdsk/Xs0          # low-level format
    /etc/newfs -v -m 2 -i 8192 /dev/rdsk/Xs0 FUJITSU_2624FA_noswap
                                                 # make a (non-bootable) system

Aside:
    'tunefs' can modify the minfree percentage, along with other values.


Enough babbling
-- jt --
John Thompson
Design Services Engineer / Sys-Admin
Honeywell, SSEC
Plymouth, MN  55441
thompson@pan.ssec.honeywell.com

Speak softly and carry a big .disclaimer





Xref: sparky comp.sys.apollo:2238 comp.sys.hp:5156