Why is there a difference between file size and size on disk?

Why is there a difference between file size and size on disk?

Size is the actual size of the file in bytes. Size on disk is the actual amount of space being taken up on the disk. They differ because the disk is divided into tracks and sectors, and can allocate blocks of discrete size.

Why do file sizes not always add up?

A file takes up more space on the disk than merely its size. For example, a text file that contains the letters “hello” has a file size of 5 bytes, but it also takes up space in the filesystem’s table to store its name and properties.

How can size on disk be smaller than size?

This would happen if you use NTFS compression to compress the file. You are correct that the size on disk is normally larger. However, sometimes, due to built in compression, the file is actually smaller on the disk. A file can also appear to be smaller on disk if the file is a sparse file.

What is meant by size on disk?

Size on disk refers to the amount of cluster allocation a file is taking up, compared to file size which is an actual byte count. This is why when you check the properties tab of a file (using Microsoft Windows), you will usually see the size on disk size is larger than the file size.

Why is file size on disk so much bigger?

It is because of the large number of small files and cluster size. Mostly the size on disk is much greater than the actual file size. Moreover, in some exceptions, this size can be less than the actual file size if your operating system uses the auto compression system.

Is a folder bigger than a file?

Since in computer hierarchy of data containment, the folder must contain the file, obviously, the folder is bigger, once the file is contained therein. A folder contains many files so the size of a folder is the sum of the sizes of all the files in the folder. So the folder is bigger.

What is the difference between size and size on disk in folder properties?

The difference between size and size on disk is that size refers to the real size of a file, size on disk is the measure of the number of bytes the file occupies on the hard disk. People are frequently confused by these two values as they are often different.

Does exFAT uses more disk space?

The default allocation unit (cluster) size in exFAT is much larger than the default allocation unit size in NTFS. Storing small files on a filesystem with large clusters will therefore waste disk space; such wasted disk space is called slack space.

What is cluster size NTFS?

Cluster size represents the smallest amount of disk space that can be used to hold a file. When file sizes do not come out to an even multiple of the cluster size, additional space must be used to hold the file (up to the next multiple of the cluster size).

Why are some files bigger than others on disk?

This size of wasted drive space keeps on adding and reaches a certain level; at that stage, the size on disk will be much larger than the actual size. These situations occur when there are lots of small files in a folder. Along with the size on disk, it also depends on the cluster size of your file system.

How big should cluster size be on disk?

When you set a larger cluster size for disk, and you have a large number of files, more space will be wasted. Usually, the typical cluster size of a drive is 4 KB. For large files like games and 3D movies, you can choose 32 or 64 KB cluster size.

What’s the difference between file size and hard drive size?

On the other hand, the size on the disk indicates the total number of bytes occupied by a file on a hard drive. Mostly, both these values are very close, you will notice this difference after opening the properties of a folder or a file. Here we explain why this difference exists and whether this should be a concern.

What’s the difference between a bigger address book and a bigger disk?

Well, it becomes a trade-off between having a bigger table (address book, e.g. saying John owns a house at 123 Fake Street, 124 Fake Street, 666 Satan Lane, etc.), or more wasted space in each unit (house).