Tips: Difference between Size vs Size on Disk

A lot of people have been confused when looking at the properties of a file, folder, or drive as the properties size and size on disk do not usually match each other. The value of size in the properties page indicates the actual size of the file while the size on disk indicates the number of bytes that it actually occupies on the hard drive.

The discrepancy comes from the way the file system stores the file on the drive. File systems treats a number of bytes as a single cluster in order to reduce the number of addresses that are being used. Depending on the file system, common cluster sizes can vary from 2KB to as large as 32KB. A file that is written to disk takes a discrete number of clusters regardless of each actual size. So a 1KB file when saved in a file system with 2KB clusters would take up 2KB but in a file system with 32KB clusters, it would take up 32KB. Also, a 33KB file would take up 17 2KB clusters (34KB) or 2 clusters in a 32KB file system (64KB). The amount of wasted space for every file would not exceed the cluster size.

Based on the arguments above, you would expect that the size on disk would be bigger than the actual size by no more than the cluster size. Though this is often true, some factors can affect these values. When looking at a folder with a lot of files inside, the discrepancy can be much bigger because each individual file can have wasted space and it all could sum up for the folder.

Sometimes, the size on the disk can be smaller than the actual size of the file. This seems to be impossible but it can occur when you are using certain features like automatic file compression that is offered by the operating system. The displayed size is the actual size of the file but since the operating system compresses it, the space occupied would often be substantially smaller.

Summary:
1.Size is the actual byte count of the file while size on disk is the actual byte count that it occupies on the disk.
2.Size on disk is usually bigger than the actual size of the file.
3.Size on disk can be smaller than the actual size for drives that use compression.

Comments

Popular posts from this blog

VMware PSOD Purple Screen of Death - Debugger waiting (world 2078) -- no port for remote debugger. "Escape" for local debugger

The Windows Time Service terminated with the following error - Event ID 7023 & 46

IBM x3650 M4 Series Server Model - Activation Keys Backup to be taken for IMM Moduel II, why?