Tail Packing in Linux File system

GEEKS !!

You must have learned about Linux file systems like ext3, ext4 ResierFs in your Red Hat Linux Training.

Do you know what is Tail Packing in Linux?

In many cases, files exist whose size is less than the size of a logical block. Rather than wasting space allocating a logical block for each small file (called a tail), multiple files are packed within a single logical block. This has been found to increase disk space by 5% over competing file systems (with a performance penalty).

Consider this example.

Files stored in blocks, usually 4Kb (the default size, can check with dumpe2fs command). Now that means:

– 1Kb file takes 1 block
– 41Kb file takes 11 blocks
– The remaining 3Kb is wasted
– These wasted space is called tails

Now is the capability of the Linux file system to take these tails and packs them into a single block. Thus term – TAIL PACKING.

It can save space (5%-6%) but adds to repacking overhead for cpu. And is expensive for CPU. Might leads to performance issues on Servers.

So I recommend that you should know it but not implement it. 🙂

 

Advertisements