Policies: How to Allocate Files and Directories
Explore how Fast File System (FFS) improves file system performance by applying allocation policies that place related files and directories close together. Understand the heuristics FFS uses to group directories and files within cylinder groups to minimize disk seeks and retain namespace locality, enhancing access speed and efficiency.
We'll cover the following...
With the group structure in place, FFS now has to decide how to place files and directories and associated metadata on disk to improve performance. The basic mantra is simple: keep related stuff together (and its corollary, keep unrelated stuff far apart).
Allocation policy
Thus, to obey the mantra, FFS has to decide what is “related” and place it within the same block group. Conversely, unrelated items should be placed into different block groups. To achieve this end, FFS makes use of a few simple placement heuristics.
Placement of directories
The first is the placement of directories. FFS employs a simple approach. First, find the cylinder group with a low number of allocated directories (to balance directories across groups) and a high number of free inodes (to subsequently be ...