[comp.sys.ibm.pc] How large should clusters be ?

kirchner@uklirb.UUCP (Reinhard Kirchner) (03/02/89)

When formatting a new hard-disk I found that FORMAT creates clusters
of 8 sectors = 4K byte if the disk is somewhat smaller than 16 MB, and
clusters of 2KB, if the disk is larger.

I did not find any information about this in my literature. So,
can somebody explain if this is correct and what's the reason
behind it.

R. Kirchner

ralf@b.gp.cs.cmu.edu (Ralf Brown) (03/04/89)

In article <4101@uklirb.UUCP> kirchner@uklirb.UUCP (Reinhard Kirchner) writes:
}When formatting a new hard-disk I found that FORMAT creates clusters
}of 8 sectors = 4K byte if the disk is somewhat smaller than 16 MB, and
}clusters of 2KB, if the disk is larger.
}[Why?]

MSDOS 3.x uses 12-bit FATs until the FATs are full (4085 clusters or so), then
switches to 16-bit FATs if there are more clusters than will fit in a 12-bit
FAT.  For compatibility with DOS 2.x, which handled only 12-bit FATs, the
cluster size is set to 4K.  When DOS switches to 16-bit FATs, it can use
smaller clusters (because it will run into the 32M barrier before the FATs
fill up), so it does--hence 2K clusters.  It turns out that 4085 clusters at
4K apiece is just under 16 megs, thus the size change at that point.

It is even possible to fool DOS into using 1K clusters, but I hear that CHKDSK
breaks if there are more than about 20000 clusters.  Also, fragmentation will
become even more of a problem with such small clusters.

-- 
{harvard,uunet,ucbvax}!b.gp.cs.cmu.edu!ralf -=-=- AT&T: (412)268-3053 (school) 
ARPA: RALF@B.GP.CS.CMU.EDU |"Tolerance means excusing the mistakes others make.
FIDO: Ralf Brown at 129/31 | Tact means not noticing them." --Arthur Schnitzler
BITnet: RALF%B.GP.CS.CMU.EDU@CMUCCVMA -=-=- DISCLAIMER? I claimed something?
--