ReFS Architecture

Despite the frequent mention of the similarities in ReFS and NTFS at a high level we are only consider the compatibility of some metadata structures (“standard information”, “file name”, some attribute flags etc. The disk implementation of ReFS structures is fundamentally different from other Microsoft file systems.

The main structural elements of the new file system are B+ trees. All the elements of the file system structure could be single-level (leaves) or multilevel (B+ trees). Such approach allows us to scale almost any of the file system's elements. Along with the real 64-bit addressing of all elements of the system this eliminates the appearance of “bottlenecks” with its further scaling.

B+ Tree

In addition to the B+ tree root record all the other records have the size of an entire metadata block (in our case 16KB). Intermediate (address) nodes have a small size (~60 bytes). Therefore usually a small number of tree levels are required to describe even very large structures. Such approach increases the overall system performance.

The main structural element of the file system is the "Directory" presented in the form of a B+ tree with the key as a number of the folder object. Unlike other similar file systems a file in ReFS is not a separate key element of the "Directory" but only exists as a record. Perhaps because of this architectural feature ReFS doesn't support "hard" links.

"Leaf"-directories are typed records. There are three main types of records for a folder object: a directory descriptor, an index record and a nested object descriptor. All such records are packaged as a separate B+ tree with a folder identifier. The root of this tree is a "leaf" of the "Directory" B+ tree. It allows you to pack almost any number of records. At the lower level in the leaves of the B+ tree there is primarily a directory descriptor record containing basic information about the directory (such as name, “standard information”, file name attribute etc.). Data structures have much in common with those adopted in NTFS although they have a number of differences the main of which is the lack of named attributes' typed list.

Further in the directory are the so-called index entries: short structures with directory elements' data. Compared to NTFS these entries are significantly shorter which is less overloading the volume with metadata. The last to follow are  catalog items' records. For folders these elements contain the name of the folder as well as the folder identifier in the "Directory" and the structure of the "standard information". For file the identifier is missing but the structure contains all the basic data about the file instead. Including the root of the file fragments' B+ tree so a file can consist of almost any number of chunks.

Files on disk are located in 64KB blocks (v. 3.1). Addressed in exactly the same way as metadata blocks (in 16KB clusters). The "residency" of file data on ReFS is not supported so a file of 1 byte on disk will take up a whole block of 64K which leads to significant redundancy of storage on small files. On the other hand it simplifies the management of free space and a new file allocation process is much faster.

The metadata size of an empty file system is about 0.1% of the size of the file system itself (i.e., about 2GB on 2TB volume). Some basic metadata is duplicated for better resiliency.

< Previous | Content | Next >