Bryan Parkoff wrote: > Is it true that HFS has a lot of wasting space or clusters if beyond > 512MB to 2GB? Curious... It is debatable where the threshold for wasted space begins - arguably, any HFS partition larger than 32 MB is wasting space. It isn't wasting "clusters" (HFS uses the term "allocation blocks"). The issue is that the size of the allocation blocks increases as the partition gets larger, hence the average amount of wasted space per file fork also gets larger. HFS is limited to 65535 allocation blocks per disk, and all allocation blocks must be an integral number of 512 byte disk blocks. For a 32 MB or smaller partition, the allocation blocks are one disk block. If you go up to an 80 MB partition, HFS uses three disk blocks per allocation block. At 512 MB, HFS uses 16 disk blocks per allocation block (8 KB). At 1 GB, HFS uses 32 disk blocks per allocation block (16 KB). At 4 GB, HFS uses 128 disk blocks per allocation block (64 KB). (etc.) If you assume that file sizes are randomly distributed, then the average amount of wasted space per file fork is equal to half the allocation block size. You can therefore estimate the total amount of wasted disk space by multiplying the total number of file forks by the total number of allocation blocks. On an Apple II, assuming the majority of files on the volume don't have resource forks, then if you have say 1000 files on an HFS volume, the amount of wasted disk space will be something in the order of 1%: 512 MB volume: 8 KB / 2 * 1000 = 4 MB 1 GB volume: 16 KB / 2 * 1000 = 8 MB 4 GB volume: 64 KB / 2 * 1000 = 32 MB This isn't a major problem, but as the number of files increases, the wasted space gets unreasonable. At 10000 file forks per volume, about 8% of the disk space is being wasted: 512 MB volume: 8 KB / 2 * 10000 = 40 MB 1 GB volume: 16 KB / 2 * 10000 = 80 MB 4 GB volume: 64 KB / 2 * 10000 = 320 MB At 50000 file forks per volume, about 39% of the disk space is being wasted: 512 MB volume: 8 KB / 2 * 50000 = 200 MB 1 GB volume: 16 KB / 2 * 50000 = 400 MB 4 GB volume: 64 KB / 2 * 50000 = 1600 MB This is more likely to be an issue on the Mac than the Apple II, because a typical Mac will probably be dealing with more files than a typical Apple II. The absolute limit for HFS is 65535 file forks per volume (one allocation block per fork). -- David Empson dempson@actrix.gen.nz David Empson wrote: > If you go up to an 80 MB partition, HFS uses three disk blocks per > allocation block. > > At 512 MB, HFS uses 16 disk blocks per allocation block (8 KB). > > At 1 GB, HFS uses 32 disk blocks per allocation block (16 KB). > > At 4 GB, HFS uses 128 disk blocks per allocation block (64 KB). > > (etc.) One other point I was intending to mention: HFS is better than the MS-DOS FAT16 file system in this area, because HFS supports allocation block sizes which conist of any integer number of disk blocks (1, 2, 3, 4, 5, 6, 7, 8, ...). FAT16 only supports cluster sizes which consist of a power of two number of disk blocks (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, etc.) This means that HFS scales more smoothly than FAT16 for larger volume sizes. FAT16 has a sudden doubling of the cluster size if you increase the partition size beyond a point where the smaller clusters can be used. (HFS+ and FAT32 both solve these problems by allowing more allocation blocks per volume, by using 32-bit allocation block numbers instead of 16-bit.) -- David Empson dempson@actrix.gen.nz