Looking at the properties for a windows file I get two attributes, Size & Size on disk and Size on disk is always larger.
What do these two metrics mean?
feedback
|
|
Size is the actual size of the file in bytes. size on disk is the actual amount of space being take up on the disk. the disk is broken down into tracks and sectors. Editing for more info I copy this from other site: We know that a disk is made up of Tracks and Sectors. In Windows that means the OS allocates space for files in "clusters" or "allocation units". The size of a cluster can vary, but typical ranges are from 512 bytes to 32K or more. For example, on my C:\ drive, the allocation unit is 4096 bytes. This means that Windows will allocate 4096 bytes for any file or portion of a file that is from 1 to 4096 bytes in length. If I have a file that is 17KB (kilo bytes), then the Size on disk would be 20.48 KB (or 20480 bytes). The calculation would be 4096 (1 allocation unit) x 5 = 20480 bytes. It takes 5 allocation units to hold a 17KB file. Another example would be if I have a file that is 2000 bytes in size. The file size on disk would be 4096 bytes. The reason is, because even though the entire file can fit inside one allocation unit, it still takes up 4096 of space (one allocation unit) on disk (only one file can use an allocation unit and cannot be shared with other files). So the size on disk is the space of all those sectors in which the file is saved. That means,usually, the size on disk is always greater than the actual size. So the actual size of a file(s) or folder(s) should always be taken from the Size value when viewing the properties window. here is the link. | ||||
|
feedback
|
|
It has to do with the allocation unit sizes used on your disk when it was formatted. Basically think of it as having a 2 - 10 gallon gas cans in your car. each gas can is an allocation unit. you need to get 12 Gallons of gas so you need to use both cans. basically using 20 Gallons of allocated space... but only filling 12 gallons here is the default size for windows xp
so if you think of the Cluster size as each of your gas cans. holding 4KB of "gas" each. but your file is 2KB then the fils size is 2K but size on disk is 4KB Hopefully this makes sense :) The chart is all messed up for formatting so i'm trying to edit it. | |||||
feedback
|
|
You cannot access each individual byte on a storage medium separately. To do so would be terribly inefficient because the system needs some way of keeping track of which ones are used and which are free (ie, a list), so doing so for each byte separately would create too much overheard (for each individual byte, ie 1-to-1, the list would be as big as the medium itself!) Instead, the medium is broken up into chunks, blocks, units, groups, whatever you want to call them (the technical term is clusters), each of which contains a—consistent—number of bytes (you can usually specify the size of the clusters since different uses call for different sizes to reduce waste). When a file is saved to disk, the size of the file is divided by he cluster size and rounded up if needed. This means that unless the filesize is exactly divisible by the cluster size, some of the cluster end up being unused and thus wasted. When you view the properties for a file, you see the true size of the file as well as the size it takes up on disk which includes any “slack”, that is, the “cluster tips” that are unused. This is usually not much per-file and the size on disk will usually be almost equal to the actual size, but when you add up the wasted space from all the thousands of files on a drive, they can add up. Therefore, when you view the size of a large folder, especially one with many tiny files that are smaller than a cluster, the size on disk (ie, the amount of disk space marked as used) can end up being significantly larger than the actual size (ie, the amount space the files actual require). In a case like above, what you can try is to reduce the cluster size so that each file wastes less space. Generally, a drive with mostly lost of little files should use the smallest cluster size possible (to reduce waste) and a drive with mostly large files should use the largest cluster size possible (this way the bookkeeping structures end up being smaller). | |||
|
feedback
|