Difference between 'size' and 'size on disk' in Explorer

Difference between 'size' and 'size on disk' in Explorer

Post by Damien Maricha » Sun, 02 Sep 2001 16:48:03



Hi,

When I right-click on a folder in the explorer and choose
the properties, the system told me to number for the size
(or space, because I'am on a french version) the folder use.

He give me the size (space) and size on disk (disk space ?).

When I've got a difference, from where come the difference ?

Thank you

Dams

 
 
 

Difference between 'size' and 'size on disk' in Explorer

Post by David Cand » Sun, 02 Sep 2001 17:08:25


Hard disks are arranged in sectors, windows uses 512 bytes in each sector (there's a couple of extra bytes so the hard drive can find a sector on the disks). These are arranged into clusters which is the smallest unit of storage. 4096 byte clusters are common.

Therefore the size on disk is the size of the file rounded up to the next 4096 bytes.
1 byte file requires 4 096 bytes on disk
2 byte file requires 4 096 bytes on disk
100 byte file requires 4 096 bytes on disk
4096 byte file requires 4 096 bytes on disk
4097 byte file requires 8 192 bytes on disk
8192 byte file requires 8 192 bytes on disk
8193 byte file requires 12 288 bytes on disk

--
--------------------------------------------------------------------------------------
David Candy - [ http://www.mvps.org/serenitymacros ]
Associate Expert Win XP
Expert Zone - [ http://www.microsoft.com/windowsxp/expertzone ]
-------------------------------------------------------------------------------------------


> Hi,

> When I right-click on a folder in the explorer and choose
> the properties, the system told me to number for the size
> (or space, because I'am on a french version) the folder use.

> He give me the size (space) and size on disk (disk space ?).

> When I've got a difference, from where come the difference ?

> Thank you

> Dams


 
 
 

Difference between 'size' and 'size on disk' in Explorer

Post by Alien Zor » Sun, 02 Sep 2001 17:27:18


Storage space on disk drives is divided into fixed size blocks called
clusters. Typically clusters are 4096 bytes, 8192, 16384 etc. depending on
the size of the hard drive.
Size of files is variable. A file has to fit into a cluster that is as big
as the file or bigger. Therefore a 1000 byte file will take up a 4096 byte
cluster on disk (the wasted 3096 bytes is known as slack space).
Statistically on average each file on disk wastes half a cluster of space.
Typical installation of Windows with 50,000 files wastes 200MB on 8GB
partition, 400MB on 16GB, 800MB on 32GB etc.


Quote:> Hi,

> When I right-click on a folder in the explorer and choose
> the properties, the system told me to number for the size
> (or space, because I'am on a french version) the folder use.

> He give me the size (space) and size on disk (disk space ?).

> When I've got a difference, from where come the difference ?

> Thank you

> Dams