Content deleted Content added
No edit summary |
|||
Line 1:
The '''Orlov block allocator''' is an [[algorithm]] to define where a particular [[computer file|file]] will reside on a given [[
== Etymology ==
The scheme is named after its creator Grigory Orlov, who first posted a brief description and implementation for [[OpenBSD
== Background ==
The performance of a file system is dependent on many things; one of the crucial factors is just how that filesystem lays out files on the disk. In general, it is best to keep related items together. The
Spreading directories on the disc allows files in the same directory to remain more or less contiguous as their number and/or size grows, but there are some situations where this causes excessive spreading of the data on the disc's surface.
== How it works ==
Essentially, the Orlov algorithm tries to spread out "top-level" directories, on the assumption that they are unrelated to each other. Directories created in the root directory of a filesystem are considered top-level directories; [[Theodore Ts'o]] added a special [[inode]] flag that allows the system administrator to mark other directories as being top-level directories as well. If /home lives in the root filesystem (and people do set up systems that way), a simple <code>chattr</code> command will make the system treat it as a top-level directory.
When creating a directory which is not in a top-level directory, the Orlov algorithm tries to put it into the same cylinder group as its parent. A little more care is taken, however, to ensure that the directory's contents will also be able to fit into that cylinder group; if there are not many inodes or blocks available in the group, the directory will be placed in a different cylinder group which has more resources available. The result of all this, hopefully, is much better locality for files which are truly related to each other and likely to be accessed together.
Line 19:
== Evolution ==
The Orlov scheme needs more rigorous benchmarking; it also needs some serious stress testing to demonstrate that performance does not degrade as the filesystem is changed over time.
== References ==
Line 25:
== External links ==
* [http://lwn.net/Articles/14633/ The Orlov block allocator]
* [http://lwn.net/Articles/14447/ Orlov block allocator for ext3] e-mail from Theodore Ts'o to [[Linus Torvalds]] and [[Alexander Viro]]
|