[TriLUG] Disk space calculations in Linux
Alan Porter
porter at trilug.org
Fri Jan 25 09:18:02 EST 2008
> If you haven't changed anything, your filesystem is likely set to
> allocate blocks in 4k chunks. So, if you have a lot of small files, you
> lose whatever the difference is ( 4k - size(file) ) per file.
This applies to large files as well. If the file is 40000k plus 1 byte,
the file uses 10000 x 4k full blocks, plus one block that contains only
1 byte.
So basically, the last block of most files will be a partially-used block.
There is similar fragmentation (not sure if that's the right word in this
case) in the inodes as well, but that is a little harder to notice.
Alan
.
More information about the TriLUG
mailing list