[comp.sys.mac] Physical Storage Amounts on Different Hard Disks

tomc@mntgfx.mentor.com (Tom Carstensen) (05/03/88)

I came across a VERY interesting phenomena when I copied the
data of my XP20 hard disk, to a CMS Pro 102k/II internal hard 
disk on a Mac II.  (Note that the XP20 was create and used
originally on a Mac SE).  The resulting two disks, both
having IDENTICAL information on them showed a difference of
over 1 Meg of storage:  XP20 18000K,  CMS 19200K.

The CMS was formatted and initialized before the copy was done, 
and had only  about 32K before the copy began.

I noticed that each folder on the CMS we slightly larger
than the same folder on the XP20.  This eventally added up 
to 1M for all the folders.

What is the reason for this.  Is it the interleave factor,
(I think both are 1:1 - maybe not?  I know the CMS is) or
something different about the CMS hard drive.

 . . I'm very curious whats adding 1Meg per 20Meg of space??
 
:------------------------------------------------------------:
: Tom Carstensen         Usenet: tomc@mntgfx.MENTOR.COM      :
: Mentor Graphics                Delphi: CARSTENSEN          :
:                                GEnie:  CARSTENSEN          :
:                                                            :
:     . . . two seperate minds, but with one single memory!  :
:                                       - Max Headroom       :
:------------------------------------------------------------:

jv0l+@andrew.cmu.edu (Justin Chris Vallon) (05/03/88)

[tomc@mntgfx.mentor.com (Tom Carstensen) asks why, after copying a folder from
one hard disk to another, the sizes are different]

I think the difference you are seeing is the difference between the logical
and physical lengths of a file.  Somebody is going to have to verify this, but
I think the block sizes on your two disks are different (entirely possible
if each was formatted with its own initialization program).  If disk A uses
512 byte blocks, while disk B uses 1K blocks, you will notice that, on the
average, each file will use up an extra 256 bytes (calc: average space wasted
on 1k block size is 512 bytes; average space wasted on 512 byte block size is
256 bytes;  difference in extra space of 256 bytes per file).
Does anybody know what the allocation block size is?  Actually, the clump size
could also complicate things.  The clump size is the minimum number of bytes
allocated each time a Write extends past the Physical EOF.  Is there any
program which could give us this information?  Fedit, MacTools, your-favorite-
program.

This probably just confuses matters, but it gives us a goal and something to
argue about :-)

-Justin
justin.vallon@andrew.cmu.edu

jv0l+@andrew.cmu.edu (Justin Chris Vallon) (05/03/88)

I forgot the mention the drives:

XP20                 18.0 Mb
CMS Pro 102k/II      19.2 Mb

From the folder/file sizes, my theory would predict that the XP20's block size
is smaller.

(Sorry if this message appears before my first reply)

-Justin
justin.vallon@andrew.cmu.edu

ephraim@think.COM (ephraim vishniac) (05/03/88)

In article <1988May2.130641.357@mntgfx.mentor.com> tomc@mntgfx.mentor.com (Tom Carstensen) writes:
>I came across a VERY interesting phenomena when I copied the
>data of my XP20 hard disk, to a CMS Pro 102k/II internal hard 
>disk on a Mac II.  (Note that the XP20 was create and used
>originally on a Mac SE).  The resulting two disks, both
>having IDENTICAL information on them showed a difference of
>over 1 Meg of storage:  XP20 18000K,  CMS 19200K.
>
>The CMS was formatted and initialized before the copy was done, 
>and had only  about 32K before the copy began.
>
>I noticed that each folder on the CMS we slightly larger
>than the same folder on the XP20.  This eventally added up 
>to 1M for all the folders.
>
>What is the reason for this.  Is it the interleave factor,
>(I think both are 1:1 - maybe not?  I know the CMS is) or
>something different about the CMS hard drive.
>
> . . I'm very curious whats adding 1Meg per 20Meg of space??

Interleaving has nothing to do with the capacity or usage of the disk.
In fact, interleaving has very little to do with anything except very
low-level performance tweaking.

Space on Macintosh volumes (as in many kinds of file systems) is not
necessarily allocated one sector at a time.  It's allocated in "Volume
Allocation Units."  The size of a VAU is proportional to the overall
size of the disk.  On HFS volumes up to about 32 megabytes (64K
sectors), the VAU is one sector.  So, it's the same on an 800K floppy
and on a 20M hard disk.  Above 32M, the VAU increases by roughly one
sector per 32M.

Your 102M disk probably has an allocation unit of 4 sectors (2K)
instead of 1 sector (.5K).  Statistically, expect a waste of .5 VAU
per file.  That's an increase of .75K per file going between the disks
you describe, so you'd see an increase of 1M with about 1300 files.
Sound about right?




Ephraim Vishniac					  ephraim@think.com
Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142-1214

     On two occasions I have been asked, "Pray, Mr. Babbage, if you put
     into the machine wrong figures, will the right answers come out?"

rob@uokmax.UUCP (Robert K. Shull) (05/04/88)

In article <1988May2.130641.357@mntgfx.mentor.com> tomc@mntgfx.mentor.com (Tom Carstensen) writes:
>
>I noticed that each folder on the CMS we slightly larger
>than the same folder on the XP20.  This eventally added up 
>to 1M for all the folders.
>
The problem, so I understand, is in the way that the Mac OS keeps track of
usage. Apparently a 16 bit number is used, allowing only 65536 blocks to be
allocated. Thus, anything larger than about 65 meg can't be allocated in
1k blocks.

The CMS 102 allocates everything in 2k blocks. I would assume that their larger
drives (like the 300) would allocate in even larger blocks. BTW, try copying
to/from a floppy. The difference is even more dramatic (the floppy is allocated
in .5k blocks)
	Robert
-- 
Robert K. Shull
University of Oklahoma, Engineering Computer Network
ihnp4!occrsh!uokmax!rob		CIS 73765,1254		Delphi	RKSHULL
Opinions contained herein in no way reflect those of the University of Oklahoma.