BetrFS

CSCI 333 :: Storage Systems

Spring 2021

From BƐ-trees to BetrFS

BƐ-trees, like LSM-trees are an example of a write-optimized key-value store. BetrFS is a Linux file system that uses BƐ-trees as its on-disk data structure. BetrFS radically departs from traditional inode-based designs because it uses full-path indexing. In other words, BetrFS has no indirection because objects in the system are named by their full paths rather than having their names mapped to an inode.

The BetrFS design has seen several iterations and is still under active development. These notes focus on the first two versions, and discuss the trajectory of the ideas.

BetrFS v1

The key design principles of BetrFS are to:

BetrFS v1 used BƐ-trees as a black box. It wanted to see how far the design could be pushed before changing (1) the OS and (2) the data structure.

BetrFS v2

BetrFS v2 set out to solve some of the biggest performance drawbacks in BetrFS v1. It introduced 3 new techniques:

BetrFS v2 still left the OS alone, but it made small changes to the data structure and schema to alleviate some of the BetrFS v1 bottlenecks. Unfortunately it compromised on the full-path keys, which future versions addressed with more invasive data structure changes.