Apple File System

Not to be confused with Apple File Service (AFS), the service implementing the Apple Filing Protocol (AFP), formerly AppleTalk Filing Protocol.

Apple File System (APFS) is a file system for macOS, iOS, tvOS and watchOS[1] that is being developed and deployed by Apple Inc.[2][3] It aims to address the core issues of the existing HFS+ (also called Mac OS Extended) file system in use on these platforms today. Apple File System is optimized for flash and solid-state drive storage, with a primary focus on encryption.[4][5]

History

Apple File System was announced at Apple's developers conference (WWDC) in June 2016, replacing HFS+ that has been in use since 1998, in an era of floppy disks and hard drives.[4][5] It was released for iOS devices on March 27, 2017, with the release of iOS 10.3.[6][1]

Design

The file system scales from an Apple Watch to a Mac Pro. It uses 64-bit inode numbers, and allows for more secure storage. The APFS code, like the HFS+ code, uses the TRIM command, for better space management and performance. It may increase read-write speeds on iOS and macOS[1], as well as space on iOS devices, due to the way APFS calculates available data.[7]

Clones

Clones allow the operating system to make fast, power-efficient file copies on the same volume without occupying additional storage space. Modifications to the data write the new data elsewhere and continue to share the unmodified blocks. Changes to a file are saved as differences of the cloned file, reducing storage space required for document revisions and copies.[3]

Snapshots

Apple File System supports snapshots for creating a point-in-time, read-only instance of the file system.[3]

Encryption

Apple File System natively supports full disk encryption, and file encryption with the following options:

  • no encryption,
  • single-key encryption, and
  • multi-key encryption, which encrypts each file with a separate key, with metadata encrypted with another one.[3]

Increased maximum number of files

APFS supports 64-bit inode numbers, supporting over 9 quintillion files on a single volume.

Data integrity

Apple File System uses checksums to ensure data integrity for metadata, but not user data.[8]

Crash protection

Apple File System is designed to avoid metadata corruption caused by system crashes. Instead of overwriting existing metadata records in place, it writes entirely new records, points to the new ones and then releases the old ones. This avoids corrupted records containing partial old and partial new data caused by a crash that occurs during an update. It also avoids having to write the change twice, as happens with an HFS+ journaled file system, where changes are written first to the journal and then to the catalog file.[8]

Limitations

In its first generation, Apple File System does not provide checksums for user data, but does for metadata integrity.[9] It also does not take advantage of byte-addressable non-volatile random-access memory,[10] and does not support compression yet.

Apple File System does not perform Unicode normalization, while HFS+ does.[11]

Support

macOS

Apple File System is available in macOS Sierra, albeit with numerous limitations; it is considered experimental. Among its limitations:[12]

A drive partition can be formatted with APFS in macOS Sierra with the diskutil command-line utility. A final version is expected in 2017.[12]

iOS, tvOS, and watchOS

iOS 10.3, tvOS 10.2, and watchOS 3.2, released on March 27, 2017, convert the existing HFS+ file system to APFS on devices compatible with iOS 10, and all Apple TV and Apple Watch devices.[6][1][13]

Tests have indicated that the iPhone 5 does not support APFS.[14]

See also

References

External links