Tail packing
From Wikipedia, the free encyclopedia
Tail packing refers to a computer file system which packs tails. Computers variously call files to be stored on a hard disk drive as either files, records or documents (among other terms). These files are physically stored on the computer hard disk in logical pieces called blocks. A block is usually a multiple of 512 bytes. When a file system tries to put a file onto a hard disk drive it determines how many blocks are needed to store the entire file, and allocates them, marks them as used and puts the file into the blocks. It fills the first block and all subsequent blocks with the file information. The last block is usually incompletely filled, and on average the waste is 1/2 of the block size (the average being spread over all of the files on the computer system). If the computer has a block size of 1024 bytes, and has 1 million files, there is an average waste of 1/2 * 1024 * 1 million = 512 megabytes. In computer terms, this waste is commonly called internal fragmentation. The wasted space at the end of the last block is called a tail. Some computer file systems try to re-use this wasted space by packing the wasted tail space with small files that will entirely fit into the tail, or split small files which will fit into the previously-wasted tail space, eliminating or reducing internal fragmentation.