0

I am operating on a Windows 7 OS. I performed a chkdsk and i know that the cluster space/bytes per allocation unit is 4096 bytes. I scanned my hard disk using a JDiskReport and the report is in the image

    Distribution of sizes in C:\

 Size Interval  SumofFileSizes(KB) %ofTotal   Files   % of Files
  Over 16 GB    0                       0.0%    0       0.0%
4 GB – 16 GB    4,256,564               4.2%    1       0.0%
 1 GB – 4 GB    16,592,054             16.4%    8       0.0%
256 MB – 1 GB   17,179,989             17.0%    23      0.0%
64 MB – 256 MB  18,418,314             18.2%    188     0.0%
16 MB – 64 MB   7,141,803               7.1%    231     0.1%
4 MB – 16 MB    11,427,285             11.3%    1,514   0.4%
1 MB – 4 MB     13,756,667             13.6%    6,482   1.6%
256 KB – 1 MB   5,891,778              5.8%   11,619    2.8%
64 KB – 256 KB  3,558,129              3.5%   29,668    7.1%
16 KB – 64 KB   1,764,479               1.7%    51,534  12.4%
4 KB – 16 KB    670,344                  0.7%   80,269  19.3%
 1 KB – 4 KB    220,179                 0.2%    104,563 25.2%
0 KB – 1 KB      60,361                 0.1%    129,148 31.1%

if you look at the last row for the file sizes of 1 kb and for 34,255 files the amount of space occupied in the hard disk will be 129148*4096=504 MB because my cluster size is 4096 bytes.

So I was wondering how my interpretation should change for file sizes beyond 4 KB ? and is there a way for me to find out the amount of space occupied for each of the different divisions mentioned below.

Edit 1:

Please point me to the correct forum that i should post this message on within the stack exchange group, if this is not the right place

bhavs
  • 179
  • 1
  • 2
  • 6

1 Answers1

1

On average, you lose half of one cluster for each file. Even for a 10 Gb file, because on average its end in the middle of a cluster. So your problem is not for very small files, it is for your total file number.

That said, the more your clusters are small, the less you lose space. But the more your files can be fragmented (so speed loss). The limit is 2^64 clusters, so you can go with 512 bytes per cluster (you will loss a little with the cluster map, but much less than what you will gain with the saved space).

If you want to know how many space you will have for another cluster size, you have to use the modulus of the cluster size for each file length. You sum up and you have your result.
But...
You have about 400,000 files. So you lose about 1 Gb. I don't think this is significant for a modern drive. If your drive is 320 Gb, this is only 0.3%.

Gregory MOUSSAT
  • 1,673
  • 2
  • 25
  • 50