|Apple File System|
|March 27, 2017 with iOS 10.3|
|macOS, iOS, tvOS, and watchOS|
Apple File System (APFS) is a proprietary file system for macOS, iOS, tvOS and watchOS, developed and deployed by Apple Inc. It aims to fix core problems of HFS+ (also called Mac OS Extended), APFS's predecessor on these operating systems. Apple File System is optimized for flash and solid-state drive storage, with a primary focus on encryption.
Apple File System was announced at Apple's developers conference (WWDC) in June 2016 as an upcoming replacement for HFS+, which had been in use since 1998. It was released for iOS devices on March 27, 2017, with the release of iOS 10.3. It is being released for macOS devices beginning with macOS 10.13, released in beta on June 5, 2017, and coming for general release in the fall.
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, as well as space on iOS devices, due to the way APFS calculates available data.
Clones allow the operating system to make efficient file copies on the same volume without occupying additional storage space. Changes to a cloned file are saved as deltas, reducing storage space required for document revisions and copies.
Apple File System supports snapshots for creating a point-in-time, read-only instance of the file system.
Apple File System natively supports full disk encryption, and file encryption with the following options:
Increased maximum number of files
APFS supports 64-bit inode numbers, supporting over 9 quintillion files on a single volume.
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.
APFS adds the ability to have multiple logical drives (referred to as Volumes) in the same container where free space is available to all volumes in that container. Similar to Apple's Fusion Drive feature, an APFS container can be either a single physical partition or built from two partitions on separate drives.
In its first generation, Apple File System does not provide checksums for user data, but does for metadata integrity. It also does not take advantage of byte-addressable non-volatile random-access memory, and does not support compression yet.
Currently released versions of Apple File System do not perform Unicode normalization while HFS+ does, leading to problems with languages other than English. The version in beta releases of macOS High Sierra does perform normalization.
Apple File System is available in macOS Sierra, albeit with numerous limitations; it is considered experimental. Among its limitations:
- drives formatted with Sierra’s version of APFS may not be compatible with future versions of macOS or the final version of APFS;
- APFS cannot be used with Time Machine, FileVault encryption, or Fusion drives.
A drive partition can be formatted with APFS in macOS Sierra with the
diskutil command-line utility. APFS will be used as the default file system for macOS beginning with macOS High Sierra, where, according to Apple Support, at least part of the aforementioned limitations will have been removed.