Subject: Re: Hard drive partitioning
To: Ken Nakata <kenn@synap.ne.jp>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-mac68k
Date: 09/14/1998 13:51:50
At 10:02 AM -0700 9/14/98, Ken Nakata wrote:
>On Mon, 14 Sep 1998 09:05:39 -0700, Henry B. Hotz wrote:
>> At 12:32 PM -0700 9/12/98, Mark de Jong wrote:
>> >I was wondering if there's someone who fully understands how to _optimally_
>> >partition a hard drive so that no cylinders/sectors are wasted. The

>> There is no perfect solution, but if you do a disklabel to see how many
>> sectors/cylinder are assumed then you can do it.  Put a dummy parition just
>
>No, no, you have to allocate the FFS partitions in sizes a multiple of
>cylinder GROUPS!  And, note that there need not be a dummy partition
>immediately after the driver partition to align the successive
>partitions.  It could be a MacOS partition or even a Swap partition
>since only the FFS partitions care about the drive geometry.  You have

I stand corrected.

>My favorite solution is to have the swap partition immediately follow
>the partition map or the driver partition, followed by some FFS
>partitions, and a MacOS partition at the end.  This way, you can
>minimize the number of unused sectors by carefully aligning and sizing
>the FFS partitions.  The reason to have swap partition first is that,
>besides for aligning the FFS partitions at cylinder boundaries, with
>zone recording technique, the outer blocks are transfered at the
>higher rate than the inner blocks.  Faster swapping must be a good
>thing although I never measured the performance gain.

I like your suggestions for avoiding wasted space.  Now a couple of nits:

Data transfer rate delays are about 2 orders of magnitude smaller than seek
time and latency delays.  If you're worried about it get another disk and
use it for swap so swap seeks don't fight with file-access seeks.

OTOH its no longer possible to get acceptable performance from a system
that does any significant swapping at all.  CPU speed and RAM sizes have
increased at about twice the rate of disk speed increases since virtual
memory became common.  This technological drift is part of the reason that
compression algorithms are so common now and were unheard of more than
about 10-15 years ago.

>> It makes things look neater under MacBSD, but remember that this is all
>> imaginary.
>
>Not if you are really determined to waste as few sectors as possible.
>The wasted sectors by misaligned FFS partitions are real.

I was referring to the speed assumptions made by the FFS algorithms.  The
space issue is real of course, if small.

Someone on this list posted a way to get the actual geometry of a SCSI
drive zone-by-zone.  I imagine you could get a small speed gain by
arranging for the supposed cylinder boundaries to match up with the actual
physical ones, but that's probably not possible without substantial
modifications to several parts of the OS.

Signature failed Preliminary Design Review.
Feasibility of a new signature is currently being evaluated.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu