Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Log-structured file system
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Rationale == {{More citations needed|date=April 2025}} Conventional file systems lay out files with great care for spatial locality and make in-place changes to their data structures in order to perform well on optical and magnetic disks, which tend to seek relatively slowly. The design of log-structured file systems is based on the hypothesis that this will no longer be effective because ever-increasing memory sizes on modern computers would lead to I/O becoming write-heavy since reads would be almost always satisfied from memory cache. A log-structured file system thus treats its storage as a [[Circular buffer|circular log]] and writes sequentially to the head of the log. This has several important side effects: * Write throughput on optical and magnetic disks is improved because they can be batched into large sequential runs and costly seeks are kept to a minimum. ** The structure is naturally suited to media with [[append-only]] zones or pages such as [[flash storage]]s and [[shingled magnetic recording]] HDDs<ref name=dbsmr>{{Cite web|url=https://dropbox.tech/infrastructure/extending-magic-pocket-innovation-with-the-first-petabyte-scale-smr-drive-deployment|title=Extending Magic Pocket Innovation with the first petabyte scale SMR drive deployment|author=Magic Pocket Hardware Engineering Teams|website=dropbox.tech}}</ref><ref name=flash>{{cite journal |last1=Reid |first1=Colin |last2=Bernstein |first2=Phil |title=Implementing an Append-Only Interface for Semiconductor Storage |journal=IEEE Data Eng. Bull. |date=1 January 2010 |volume=33 |page=14-20 |url=http://sites.computer.org/debull/A10dec/hyder.pdf}}</ref> * Writes create multiple, chronologically-advancing versions of both file data and meta-data. Some implementations make these old file versions nameable and accessible, a feature sometimes called time-travel or [[snapshot (computer storage)|snapshotting]]. This is very similar to a [[versioning file system]]. * Recovery from crashes is simpler. Upon its next mount, the file system does not need to walk all its data structures to fix any inconsistencies, but can reconstruct its state from the last consistent point in the log. Log-structured file systems, however, must reclaim free space from the tail of the log to prevent the file system from becoming full when the head of the log wraps around to meet it. The tail can release space and move forward by skipping over data for which newer versions exist further ahead in the log. If there are no newer versions, then the data is moved and appended to the head. To reduce the overhead incurred by this [[garbage collection (computer science)|garbage collection]], most implementations avoid purely circular logs and divide up their storage into segments. The head of the log simply advances into non-adjacent segments which are already free. If space is needed, the least-full segments are reclaimed first. This decreases the I/O load (and decreases the [[write amplification]]) of the garbage collector, but becomes increasingly ineffective as the file system fills up and nears capacity.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)