![]() Why are there different allocation unit sizes? Well, it becomes a trade-off between having a bigger table (address book, e.g. Your file is only using a small amount of this space, and the rest is basically wasted, but still belongs to the file – much like a bedroom you leave unoccupied. So what happens if you have a very small file? Well, the file system doesn’t care if the file is 0 KB, 2 KB, or even 15 KB, it’ll give it the least space it can – in the example above, that’s 32 KB. ![]() Much like you have a house number, but your postman doesn’t care how many bedrooms you have or who lives in them. ![]() The volume is divided into these allocation units, and as far as the file system is concerned, they cannot be subdivided – those are the smallest blocks it can address. ![]() So what they do is use “allocation units”, also known as the “cluster size”. If it were to keep a list of every single byte, the table (like an address book) would grow at the same speed as the data – and waste a lot of space. Why does this happen? Well, the FAT32 file system needs to keep track of where each file is stored. If each file averaged 2 KB, you’d get about 100 MB total – but you’re also wasting 15x that (30 KB per file) on average due to the allocation unit size. The space each file takes on the disk is always a multiple of the allocation unit size – and here we’re assuming each file is actually small enough to fit within a single unit, with some (wasted) space left over. Ok, now the minimum space taken is 50,000 * 32,000 = 1.6 GB (using SI prefixes, not binary, to simplify the maths).
0 Comments
Leave a Reply. |