View Single Post
  #4 (permalink)  
Old 01-18-2007, 08:30 PM
Wesley Vogel
Newsgroup Contributor
 
Posts: n/a
Re: File size different on disk and copied file Why?

File Slack.

In data storage, the smallest amount of disk space that can be allocated to
hold a file is called a cluster. Most files are not the same size as the
cluster size on a hard disk. The difference between the actual file size
and the cluster size is called file slack. File slack is wasted space.
There will always be wasted space no matter what size the clusters are.
File size plus file slack equals Size on disk.

If your hard drive has 4KB cluster size and you have a file that is 1KB,
File Properties will show:

Size: 1.00KB (1,024 bytes)
Size on Disk: 4.00KB (4,096 bytes)

Size is the actual size of file's (or folder's) data.

Size on disk is the actual space that the file (or folder) takes up on the
hard drive.

What File Properties does not show is the file slack. From the example
above, the file slack would be 3KB (2,048 bytes) of wasted space.

KB (kilobyte) is a binary number, 2 to the tenth power, 2^10
or 1,024 bytes. So 1KB is 1,024 bytes, not 1000 bytes like we would
normally think of using decimal numbers

For best overall file system performance, a 4KB cluster size is best.

If the cluster size is too large, there is more file slack.

If the cluster size is too small, there will be more fragmentation.

The smaller the cluster size, the more efficiently a disk stores information
because unused space within a cluster cannot be used by other files.

You can find the cluster size, also called allocation unit, by looking at
the chkdsk log in the Event Viewer.

Open the Event Viewer...
Start | Run | Type: eventvwr | Click OK |
Look in Application | Listed as Information |
Event ID: 1001
Source: Winlogon

Similar to this:
4096 bytes in each allocation unit.

How to locate and correct disk space problems on NTFS volumes in Windows XP
http://support.microsoft.com/kb/315688

Disk Quota Charges Increase If You Turn On the NTFS Compression
Functionality
http://support.microsoft.com/kb/320686

Binary vs. Decimal Measurements
http://www.pcguide.com/intro/fun/bindec.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:OWYwCv3OHHA.140@TK2MSFTNGP04.phx.gbl,
Spikey <hedge_hogg@NOSPAMbtinternet.com> hunted and pecked:
> Can someone explain why file properties say eg. 20mb 2 folders 7 files but
> size on disk will be slightly larger at 20.02 mb 2 folders 7 files? I'm
> used to seeing this difference but unsure why it does it.
>
> Also if you took an exact copy (with hidden files viewable) of the
> original 20mb 2 folders 7files on to another drive why would it state
> the files on disk as lower than the original eg size on disk 20.1.
>
> I've just copied hubbies my docs to his D drive, and then I'm backing the
> original my docs to disk before deleting. Hes been cramming everthing on C
> and was oblivious to the big empty unused expanse of D where they probably
> should have been in the first place!!!!
>
> I've compared the 2 copies 1 still on C and everything has copied, nothing
> missing. But I have this nagging doubt as the file on disk size is
> reporting magianlly less.
>
> Finally there were a couple of small game saves (we think) on D. Given
> that hes always saved to his docs which were targeted to C docs and
> setting etc, how did they get there (excluding user error)? Would an Acer
> (XP home) laptop be capable of automatically start saving to D if C was
> overflowing? I realise its all the same drive but my understanding was
> that once partitioned they are regarded as 2 separate drives.
>
> Thank in advance.
>
>> o)


Reply With Quote

 
Old 01-18-2007, 08:30 PM