file question

B

b11_

Sometimes the "size on disk" of a file is much larger than the "size" of the
file. How can that be avoided? In other words, what should be done so the
"size on disk" is about the same as the "size"?
 
D

dadiOH

b11_ wrote:
> Sometimes the "size on disk" of a file is much larger than the
> "size" of the file. How can that be avoided? In other words, what
> should be done so the "size on disk" is about the same as the
> "size"?


Are you talking about file size vs bytes used? Files normally use
more bytes than the actual file size because the space for the file is
allocated in pre-set chunks. How big those allocation units are
depends on the size of the hard drive. For example, if the HD is
formatted to a bit less than 8 GB the allocation unit is 4096 bytes.
Allocation units vary in size...2048, 4096, 8192, 16384, 32768.

When the actual size of the file exceeds space for it another
allocation ubit is assigned to the file.

--

dadiOH
____________________________

dadiOH's dandies v3.06...
....a help file of info about MP3s, recording from
LP/cassette and tips & tricks on this and that.
Get it at http://mysite.verizon.net/xico
 
9

98 Guy

dadiOH wrote:

> > Sometimes the "size on disk" of a file is much larger than the
> > "size" of the file. How can that be avoided?


> Files normally use more bytes than the actual file size because
> the space for the file is allocated in pre-set chunks. How big
> those allocation units are depends on the size of the hard drive.


As dadiOH says, file space is allocated in chunks that are known as
clusters or allocation units. All versions of FAT (and NTFS) allocate
disk space based on clusters that have a fixed size.

When a drive (or more correctly, a FAT-32 volume) is formatted, the
cluster size is set according some built-in rules used by the
format.com program. Those rules are designed such that the cluster
size is adjusted so that you don't end up with more than 2 million
clusters on a given volume.

Microsoft designed it that way so that drive defragmentation and file
allocation table checking wouldn't take a long time nor a lot of
system memory. What that means is that a volume of a given size will
end up with a particular cluster size, as follows:

up to 8 gb -> cluster size 4 kb
up to 16 gb -> cluster size 8 kb
up to 32 gb -> cluster size 16 kb
up to 64 gb -> cluster size 32 kb (max size for a cluster)

For volumes larger than 64 gb, the cluster size remains at 32 kb (the
max size for a cluster) but the cluster count is allowed to exceed 2
million, and reaches 4 million for volumes that are 128 gb in size.
The 4-million-cluster-count number, and the 128 gb volume-size number,
have special meaning or specific explanations (and significance or
consequences) that I (and others) have discussed in previous posts.

The FAT-32 specification does not call for or require increases to the
cluster size as the volume size increases. As a result, it is
possible to format a volume and use a different cluster size than the
format.com program would have chosen.

About 6+ months ago, I posted a series of messages exploring the
consequences of using "non-standard" cluster sizes while running
windows-98. The short answer is that yes, it is possible, and safe,
and certainly more efficient (from a disk utilization standpoint), but
there are some issues that need to be understood (and can be dealt
with).

As to your other question - the difference between "FAT" and "Fat-32",
that has already been answered, but generally I believe that "FAT" is
used as a generic term to refer to the "FAT family" (FAT-12, FAT-16,
and FAT-32) and that it may have been used many years ago to refer to
FAT-12 before the development or deployment of the other 2 FAT types.
 
D

Don Phillipson

"b11_" <b11@discussions.microsoft.com> wrote in message
news:1B4DAEFC-AEBC-4AE2-AE98-F9C5A8B7688B@microsoft.com...

> Sometimes the "size on disk" of a file is much larger than the "size" of

the
> file. How can that be avoided? In other words, what should be done so the
> "size on disk" is about the same as the "size"?


You are looking at this from the wrong end.
Disk storage is organized in clusters, commonly
2k to 32k each (depending on Operating System
and total size of the hard drive) and every file needs
at least one cluster (i.e. no cluster can be shared
between two files, because the File Allocation Table
lists every cluster that belongs to each file.)

So an ASCII (plain text file) with the contents
XYZ
has a file size of only a few bytes -- but it still
has a cluster (2kb or 4kb or 8kb or 16kb or 32 kb)
all to itself i.e. fills that much drive space.

Formatted files take much more space. An MSWord
file with contents
XYZ
has a file size of about 20 kb, i.e. if it is on a drive
with 16 kb clusters it occupieis 32 kb of drive space.

--
Don Phillipson
Carlsbad Springs
(Ottawa, Canada)
 
B

b11_

So would file "X" use less space on a disk having Fat(Fat 16) compared to a
disk having Fat32?
______________________________________________________

"Don Phillipson" wrote:

> "b11_" <b11@discussions.microsoft.com> wrote in message
> news:1B4DAEFC-AEBC-4AE2-AE98-F9C5A8B7688B@microsoft.com...
>
> > Sometimes the "size on disk" of a file is much larger than the "size" of

> the
> > file. How can that be avoided? In other words, what should be done so the
> > "size on disk" is about the same as the "size"?

>
> You are looking at this from the wrong end.
> Disk storage is organized in clusters, commonly
> 2k to 32k each (depending on Operating System
> and total size of the hard drive) and every file needs
> at least one cluster (i.e. no cluster can be shared
> between two files, because the File Allocation Table
> lists every cluster that belongs to each file.)
>
> So an ASCII (plain text file) with the contents
> XYZ
> has a file size of only a few bytes -- but it still
> has a cluster (2kb or 4kb or 8kb or 16kb or 32 kb)
> all to itself i.e. fills that much drive space.
>
> Formatted files take much more space. An MSWord
> file with contents
> XYZ
> has a file size of about 20 kb, i.e. if it is on a drive
> with 16 kb clusters it occupieis 32 kb of drive space.
>
> --
> Don Phillipson
> Carlsbad Springs
> (Ottawa, Canada)
>
>
>
>
 
T

Tim Slattery

b11_ <b11@discussions.microsoft.com> wrote:

>So would file "X" use less space on a disk having Fat(Fat 16) compared to a
>disk having Fat32?


IIRC, FAT32 would use a smaller cluster size than FAT16 for a
particular partition size, so the file would take less disk space on a
FAT32 partition. Of course, once the partition goes over 2.1GB, you
don't have a choice of file system anyway.

--
Tim Slattery
MS MVP(Shell/User)
Slattery_T@bls.gov
http://members.cox.net/slatteryt
 
Back
Top Bottom