How many modern file systems are reserved for each block group?

In reading about Unix FFS, I read that 10% of the disk space is reserved so that the file data blocks can be in the same cylinder group. This is still true on file systems such as ext2 / ext3, is there any reserved space so that blocks of data files can be in the same block group? Is it also 10%? or is it different? Is the same true for journaling file systems? Thanks.

+7
source share
2 answers

First of all, I think that ext file systems implement the same concept of a group of cylinders, they just call it a block group. to find out about this, you can fdisk section to find your actual block counter and the number of blocks / groups. Then number of block groups = block count / (block/group) . They are used in exactly the same way as FFS cgs (to speed up access time). Now IMO logging has nothing to do with this operation, except that it actually takes up some more space on your disk :). As far as I understand, soft updates, which are the BSD solution for the problem that the log will solve in typical ext file systems, do not require additional space, but are extremely difficult to implement and add new functions (for example, to resize). interesting to read:

ext3 extended overhead, part 1

Hooray!

+1
source

My data for fresh ext2 images:

 Size Block size Bl/Gr Total bytes Free bytes Ratio 1MB 1024 8192 1048576 1009664 0.03710 10MB 1024 8192 10485760 10054656 0.04111 100MB 1024 8192 104857600 99942400 0.04688 512M 4096 32768 536870912 528019456 0.01649 1G 4096 32768 1073741824 1055543296 0.01695 10G 4096 32768 10737418240 10545336320 0.01789 

So, it is quite predictable that the efficiency of the Ext2 file system space depends on the block size due to the layout described in the answer above: the file system is a set of block groups, for each group its size is defined as the number of blocks, which can be described as 1-block bitmap => for 4096 byte blocks, there are 8 * 4096 blocks.

Conclusion : for the ext2 / ext3 file system family, the average default space consumption depends on the block size: ~ 1.6 - 1.8% for 4096 byte blocks, ~ 4% for 1024 units

0
source

All Articles