Apple File System (APFS): What you need to know!

For all questions & answers about 3uTools and iOS

Moderators: Lily Lee, jc_3u, Moderators

Grace Liu
Posts: 537
Joined: 20 Oct 2016 09:33
like: 65

Apple File System (APFS): What you need to know!

Postby Grace Liu » 09 Feb 2017 13:59

apple-file-system-hero-icon.jpg
apple-file-system-hero-icon.jpg (35.48 KiB) Viewed 4961 times

APFS is the Apple File System. It was introduced at WWDC 2016 and, starting this year, it will replace the existing file system, HFS+, on Apple Watch, Apple TV, iPhone, iPad, MacBook, iMac, and Mac Pro.

Apple made a developer preview available for macOS Sierra back at WWDC and, with iOS 10.3 beta, Apple's made APFS available for testing on iPhone as well.

Many people don't need to know much about Apple File System. It's an implementation detail that will be largely transparent to end-users when it rolls out. Any future features it enables, like smarter backups and faster updates, and things we haven't even thought about yet, will no doubt get market all on their own anyway. For them, APFS will likewise be an implementation detail.

For anyone interested in file systems, though, there's a lot in APFS to find interesting.

①Why is Apple replacing HFS+?
HFS+ has been around since 1998 — almost twenty years ago — and has been updated and McGyver'd in almost every way imaginable since then in order to try and keep up with the demands of modern computing.

Since then we've also gone from hard drive platters to solid state disks, from physical installs to digital downloads, and from manual backups to Time Machine and iCloud. We've gone from rigid, single-threaded data structures to more flexible approaches.

Through it all, HFS+ and its valiant crew have kept it running. Running in the red, maybe, held together with bubblegum and paperclips, but running.

But running in the red is no way to get to the future. For that, you need something new.

Sometimes, to make it to the future, you need a fresh approach.

②What makes APFS more consistent?
While HFS+ runs on all of Apple's current devices, there are differences in how it's been implemented across those devices, including key areas like encryption. That means different source code and separate maintenance and development.

APFS was designed to scale more consistently across Apple's platforms, now and into the future. That should allow for a single code base with fewer resources need to develop and maintain it and allow it to grow faster and better.

③Will APFS be faster?
A great deal of speed has to do with perception. It's faster to reach for a drink on the table next to you than to have to get up and go get it from the fridge. APFS does several things to make Apple devices feel faster.

APFS, for example, focuses on low-latency. So, it prioritizes things like app launches and data delivery. That should minimizing beach balls and spinners.

④How does APFS better suit SSDs?
Apple says APFS has been written with solid state storage in mind. That's the flash storage chips inside Apple Watch, Apple TV, iPhone, iPad, MacBooks, and high-end Mac desktops.

What Apple means by this is that APFS writes in a way optimized for solid state, and supports the TRIM command which is helpful for people who delete a lot of files and like to keep a lot of space free.

⑤Will APFS help with storage space?
For macOS users who employ partitions, AFS fixes a long-standing limitation. Basically, APFS sidesteps the issue of one partition running out of space when there's free space elsewhere on the drive by creating a container around all the partitions. If a partition needs more space it can claim it from the container, regardless of whether or not that space is physically adjacent to the partition.

APFS also supports sparse files, so storage is only allocated when it's really needed.

⑥What about data integrity and crash protection?
APFS has atomic-level save state. That has to do with how it handles committing writes for files — they're either verified as completed or it appears as though they never happened at all. In other words, files use copy-on-write so a new version is created and the old version only released when the save is successful.

There are also checksums on metadata, though not on user-data.

⑦APFS is better for encryption, though, right?
Apple makes security and privacy first-class, public facing, top-down features for their products and APFS is no different. Unlike current implementations, where macOS has disk-level encryption and iOS has file-level encryption, thanks to differences in implementation and hardware capabilities, APFS has a more consistent single-key and multi-key implementations for system-level, file level, and even specific data and metadata.

The type of encryption can vary between AES-XTS and AES-CBC depending on hardware.

⑧Is APFS missing anything?
For the beta, there are several things you can't yet do with APFS:
[*]Startup disks
[*]Time Machine
[*]FileVault
[*]Fusion Drive

⑨Will APFS be open sourced?
APFS is not currently open source. Over the years, Apple has either kept open and continued to contribute to, or themselves open sourced, the Mach Kernel, WebKit, LLVM, and Swift, among other projects.

Whether that will eventually include APFS we'll have to wait and see.

Return to “Help & Support”