Apple is planning to introduce a new file system, called Apple File System, as the default on all devices in 2017, and has provided developers with a preview in the developer release of macOS Sierra (10.12) that was introduced this week at the company's annual developer conference, WWDC.
In 2007, Apple had similar plans for ZFS, a file system designed by Sun Microsystems. Apple included a read-only copy of ZFS in OS X Leopard (10.5) in order to explore options for high-end storage. But Apple was unable to reach a mutually agreeable licensing deal with Sun, and it had abandoned the project by 2009, the year Oracle announced its plan to acquire Sun.
At the time, blogger John Gruber reported Apple had begun work on its own file system. Seven years on, we have an early glimpse of Apple File System, or APFS.
"Apple File System is a new, modern file system for iOS, OS X, tvOS and watchOS," Apple explains in its developer documentation. "It is optimized for Flash/SSD storage and features strong encryption, copy-on-write metadata, space sharing, cloning for files and directories, snapshots, fast directory sizing, atomic safe-save primitives, and improved file system fundamentals."
Mundane as this may sound, APFS promises to improve upon Apple's legacy file system, HFS+, which predates the arrival of OS X in 2001.
Flash/SSD optimization translates to faster file operations, given that solid state storage has become the default storage medium for mobile devices.
Improved encryption promises better security on Apple devices. Apple's FileVault encryption system is already pretty good, but with APFS, users will have not only the option to activate full-disk encryption (one key per volume) but also the option to employ different keys for each file and for each set of metadata.
Apple has offered full-disk encryption since OS X 10.7 Lion. Since iOS 4, it has encrypted each iOS file with its own key, which offers stronger security than a single per-volume key. APFS will offer a unified approach that is consistent across iOS, OS X, tvOS, and watchOS.
APFS uses "a novel copy-on-write metadata scheme" to ensure that files don't get corrupted if there's a crash while data is being written. It supports sparse files, a storage scheme by which files stored in discontinuous blocks don't have to include the unused space between those blocks.
APFS also rethinks disk partitioning, the process by which a single physical storage device can be divided up into separate volumes, each of which can be mounted as if it were a discrete device. Partitioning can be problematic because it requires storage space to be apportioned when the volumes are formatted, before it's clear how much space will be needed for each. Partitions can be resized but the presence of files may limit potential changes.
APFS holds partitions in a container, making them essentially pointers to actual storage space. As such, APFS partitions can be resized without repartitioning. The approach allows more efficient use of available storage space.
Apple's new file system should make it easier to back up and restore data. APFS supports cloning, a nearly instant process by which files or directories can be copied. Cloned files represent pointers to stored data, and only get written separately when the original files get changed. This is a far more efficient approach than duplicating file data in a second location on whatever storage medium is being used.
Similarly, APFS support Snapshots, which amount to read-only clones. These file system instances can be used to rapidly restore or reimage devices to a specific state.
The changes coming in APFS won't be immediately apparent for most Apple customers. But the end result will be a better user experience, greater reliability, stronger security, and more flexibility to accommodate future innovations.