Dynamic Allocation Units in Unix File Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional UNIX-based file systems have a fixed allocation unit size, which hampers efficient management of large files and sparse files with small holes, leading to increased file system check and recovery times, as well as performance issues with varying file sizes and usage patterns.
Innovation Solution
Implementing a file server with a dynamic allocation unit size for each file, allowing allocation units to consist of one or multiple contiguous file system blocks, and using a file system manager program to manage these units, enabling flexible read and write access by determining the allocation unit size and using block mapping procedures to optimize data access.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If a fixed allocation unit size equal to file system block size is used, then the file system structure is simple and easy to manage, but large files require many indirect blocks increasing check and recovery time
Solution Approach 1:
The patent implements dynamic allocation unit sizes that can vary per file based on its characteristics. The file system manager determines appropriate allocation unit sizes dynamically, allowing files to have allocation units larger than the base block size when beneficial, thereby reducing the number of indirect blocks for large files while maintaining structural flexibility.
Solution Approach 2:
The patent changes the parameter of allocation unit size from a fixed value to a variable parameter that can be adjusted per file. By allowing allocation unit sizes to be integral multiples of the file system block size, the system optimizes the balance between metadata overhead and indirect block reduction for different file sizes and access patterns.
2Quantity of substance
If a small file system block size is used, then small files are stored efficiently, but large files require many indirect blocks increasing overhead and check time
Solution Approach 1:
The patent merges multiple file system blocks into larger allocation units for large files. By allowing allocation units to consist of integral multiples of block sizes (e.g., 2K, 4K, 8K allocations from 1K blocks), the system reduces the total number of block pointers and indirect blocks required, thereby reducing metadata overhead while maintaining efficient storage.
3Loss of time
If a large allocation unit size is used for all files, then the number of indirect blocks is reduced, but small files waste space and lose efficiency
Solution Approach 1:
The patent applies the principle of local quality by allowing different allocation unit sizes for different files based on their specific characteristics. The file system manager evaluates each file's size, access patterns, and other attributes to determine the optimal allocation unit size locally for that file, rather than applying a uniform allocation size across all files. This ensures small files use minimal allocation units while large files benefit from larger allocation units that reduce indirect blocks.
Data Source
AI summary
A file system has files constructed of an inode for each file, indirect blocks, and allocation units of file system data blocks. Each of the allocation units has one of the file system data blocks or a plurality of the file system data blocks having contiguous file system block numbers. Each file in the file system has a respective allocation unit size attribute specifying an allocation unit size of each and every allocation unit in the file, and the files in the file system have allocation units of different allocation unit sizes. By using larger allocation units for larger files, there is a reduction in the number of indirect blocks in the files without a corresponding loss in performance, and a reduction in the time needed for the UNIX FSCK utility to check file system consistency.


