APFS: What You Need To Know About Apple’s New File System

By | March 27th, 2017

APFS Apple File System

Editor’s note: We posted this article originally in August 2016. We’ve since updated it with new information.

APFS, or Apple File System, is one of the biggest changes coming to every new Apple device. It makes its public debut with the release of iOS 10.3, but it’s also coming to the Mac (in fact, it’s already available if you’re a developer). APFS changes how the Mac, iPhone and iPad store files. Backing up your data is our job, so we think a new file system is fascinating. Let’s take a look at APFS to understand what it is and why it’s so important, then answer some questions about it.

File systems are a vital component of any computer or electronic device. The file system tells the computer how to interact with data. Whether it’s a picture you’ve taken on your phone, a Microsoft Word document, or an invisible file the computer needs, the file system accounts for all of that stuff.

File systems may not be the sexiest feature, but the underlying technology is so important that it gets developers interested. Apple revealed plans for APFS at its annual Worldwide Developers Conference in June 2016. APFS thoroughly modernizes the way Apple devices track stored information. APFS also adds some cool features that we haven’t seen before in other file systems.

APFS first appeared with macOS 10.12 Sierra as an early test release for developers to try out. Its first general release is iOS 10.3. Apple will migrate everything to use it in the future. Since our Mac client is a native app, we like many Apple developers, have been boning up on APFS and what it means.

What Is APFS?

Apple hasn’t defined the P in APFS, but that differentiates it from Apple File Service (AFS), a term used to describe older Apple file and network services.

APFS is designed to scale from the smallest Apple device to the biggest. It works with watchOS, tvOS, iOS and macOS, spanning the entire Apple product line. It’s designed from the get-go to work well on modern Apple device architectures and offers plenty of scalability going forward.

APFS won’t change how you see files. The Finder, the main way you interact with files on your Mac, won’t undergo any major cosmetic changes because of APFS (at least none Apple has told us about yet). Neither will iOS, which mostly abstracts file management: the under-the-hood stuff that tells the computer where to put and how to work with data.

Why Did Apple Make APFS?

The current file system Apple uses is HFS+. HFS was introduced in 1985, back when the Mac was still new. That’s right, more than thirty years ago now. (HFS+ came later with some improvements for newer Macs.)

To give you an idea of how “state of the art” has changed since then, consider this. My first Mac, which came out late in 1984, had 512 KB of RAM (four times the original Mac’s memory) and a single floppy drive that could store 400K. This computer I’m writing from now has 8 GB of RAM – almost 16 thousand times more RAM than my first Mac – and 512 GB of storage capacity. That’s more than 1.2 million times the size of that first Mac. Think about that the next time you get a message that your drive is full!

Given the pace of computer technology and development, it’s a bit startling that we still use anything developed so long ago. But that’s how essential and important a file system is to a computer’s operation.

HFS+ was cutting-edge for its time, but Apple made it for computers with floppy disk drives and hard drives. Floppies are long gone. Most Apple devices now use solid state storage like built-in Flash and Solid State Drives (SSDs), and those store data differently than hard drives and floppies did.

Why Is APFS Better?

APFS better suits the needs of today’s and tomorrow’s computers and mobile devices because it’s made for solid-state storage – Flash, and SSDs. These storage technologies work differently than spinning drives do, so it only makes sense to optimize the file system to take advantage.

Apple’s paving the way to store lots more data with APFS. HFS+ supports 32-bit file IDs, for example, while APFS ups that to 64-bit. That means that today, your Mac can keep track of about 4 billion individual pieces of information on its hard drive. APFS ups that to 9 quintillion. That’s a nine followed by 18 zeroes (actually, much more than that, because of hexadecimal values).

Even though APFS can keep track of orders of magnitude more data than HFS+, you’ll see much faster performance. When you need to save or duplicate files, APFS shares data between files whenever possible. Instead of duplicating information like HFS+ does, APFS updates metadata links to the actual stored information. Clones, or copies of files or folders can be created instantly. You won’t have to sit and watch as gigabytes of files are duplicated en masse, wasting extreme amounts of space in the process. In fact, clones take up no additional space, since they’re pointing back to the original data! You’ll get much better bang for your storage buck with APFS than HFS+ can manage.

Speaking of space, Space Sharing is another new feature of APFS. Space Sharing helps the Mac manage free space on its hard drives more efficiently. You can set up multiple partitions, even multiple file systems, on a single physical device, and all of them can share the same space. You presently have to jump through hoops if you’re resizing partitions and want to re-use de-allocated space. APFS views individual physical devices as “containers,” with multiple “volumes” inside.

How Does APFS Affect Performance?

Networking is crucial for almost all computers and computing devices. Over the years there’s been a lot of emphasis on tuning operating system performance for maximum throughput. That’s helpful to developers like us because we store data in the cloud. But that’s not the whole story. Latency – the amount of time between you telling your computer to do something and when it happens – also has a significant effect on performance.

Has “the Beachball of Death” ever plagued you? You’ll click a button or try to open something, and the cursor changes to a spinning disk that looks for all the world like a beachball. Apple’s doing a lot more with APFS to make beachballs go away. That’s because they’re prioritizing latency – the amount of time between when you ask your device to do something and when it does it.

Apple has found other ways to improve performance wherever possible. Take crash protection, for example. HFS+ uses journaling as a form of crash protection: It keeps track of changes not yet made to the file system in log files. Unfortunately, journaling creates performance overhead. Those log files are always being written and read. APFS replaces that with a new copy-on-write metadata scheme that’s much more efficient.

How Is APFS Security?

Apple is very concerned with user privacy. Their protection of their users’ privacy has occasionally put Apple at loggerheads with governments and individuals who want your data. Apple’s taking your privacy seriously with APFS, thanks to much more sophisticated encryption options than before.

Apple’s current encryption scheme is called FileVault. FileVault is “whole disk” encryption. You turn it on, and your Mac encrypts your hard drive. That encrypted data is, for all intents and purposes, unrecognizable unless you enter a password or key to unlock it.

The problem is that FileVault is either on or off, and it’s on or off for the whole volume. So once you’ve unlocked it, your data is potentially vulnerable. APFS still supports full disk encryption, but it can also encrypt individual files and metadata, with single or multi-key support. That provides additional security for your most sensitive data.

As a backup company, one feature of APFS we’re particularly interested in is its support for snapshots. Snapshots are a pretty standard feature of enterprise backups, but we haven’t seen them yet on the Mac. A snapshot contains pointers to data stored on your disk, providing fast access to data stored on the disk. Because the snapshot contains pointers, not the actual data, it’s compact, and accessing it is very fast.

How Do I Get APFS?

If you’ve upgraded to iOS 10.3 or later, your iPhone or iPad has already made the switch. There’s nothing more to do. If you’re a Mac user, you’re best off waiting for now. APFS support on the Mac is still provisional and mainly the purview of developers. But it’s coming soon, and when it does, Apple promises the same sort of seamless conversion that iPhone and iPad customers have.

When the time is right, make sure to back up your Mac before making any essential changes – just as you should with your iPhone or iPad if you haven’t yet installed 10.3. If you need help, head over to our Computer Backup Guide for more tips.

There’s a lot more under the hood in APFS, but that gives you a broad overview of what it is and why we’re excited. We hope you are too. APFS is an “under the hood” enhancement in iOS 10.3 that shouldn’t have any significant effect on how your Apple gear works today, but it paves the way for what’s to come in the future.

Peter Cohen
Peter will never give you up, never let you down, never run around or desert you. He also manages the Backblaze blog.

Follow Peter on:
His web site: peter-cohen.com | Twitter: @flargh | LinkedIn: Peter Cohen | Google+: Peter Cohen
  • Sgt_Bilko

    Like many others, my main boot drive is SSD, however I store lots of larger or rarely used files on internal SATA drives in my Mac Pro. This article mentions how APFS is mainly intended for SSD drives, but I’m curious to know what sort of performance impact it will have on older drives. Will all drives need to be completely formatted i.e wiped before moving to APFS?

  • Patrick Smit

    It’s iOS 11 not 10.13

    • Christopher Lim

      iOS 10.3 rolled out APFS iirc. 10.13 would likely denote to macOS 10.13 (High Sierra) which will see the rollout of APFS on Mac Devices.

      • Patrick Smit

        If you don’t know what you are talking about why bother replying… APFS is not an operating system, it’s a file system, It is already rolled out silent by apple over all iOs TVOs and WatchOs devices 10.13 was the last bit. APFS has nothing to do with the 10.13 operating system itself, 10.12 has APFS support as well.

        • Christopher Lim

          But I do know what I’m talking about, although 10.12 saw the support of APFS, the file system for the primary built-in storage medium was not converted to APFS. Instead, it was only available for external drives as far as I know. iOS 10.3 saw the file system on iOS devices convert to APFS from HFS+. The same is scheduled to happen with macOS 10.13. Although APFS is not an operating system, rather the foundation for how data is read, it’s deployment so far has coincided with the deployment of certain software updates.

  • Shubham Maheshwari

    All the points mentioned are pros. but what about cons ?
    I am sure , with closed ecosystem there must be few compatible issues .
    If anyone , care to mention them ?

    • Christopher Lim

      A file system manages how a storage device reads data. The data on the storage device isn’t effected. Compatibility between different operating systems will not be effected. Only compatibility with storage hardware might be. In that case, the storage device would remain on its existing file system. I’m only a consumer however so feel free to correct me.

  • disqus_FpQuvS0cdp

    ” Clones, or copies of files or folders can
    be created instantly. You won’t have to sit and watch as gigabytes of
    files are duplicated en masse, wasting extreme amounts of space in the
    process. In fact, clones take up no additional space, since they’re
    pointing back to the original data! You’ll get much better bang for your
    storage buck with APFS than HFS+ can manage.”

    I don’t get the point of this. Cloning is something I’d do from the original source to another drive or volume location in which case I’d -want- to have all the original files’ content. Why would I want to clone massive amounts of data -from- AND -to- the same volume? Then I’d find that I couldn’t delete the original file because there’s another (metadata) “file” using that original. I can only imagine users dealing with that error dialog. I see this as a brewing disaster of biblical proportions; sorry.

  • The Cappy

    I assumed the “P” in APFS stood for “persistent.”

  • Ich Bins

    Very informative, looking forward to the long awaited next gen Apple filesystem.

  • Cryptoanarchist

    One thing that’s changed is APFS won’t normalise Unicode file names, apps that need this will need to have it added as a function of the app rather than having the file system do it for them:

    http://mjtsai.com/blog/2017/03/24/apfss-bag-of-bytes-filenames/

  • Well, according to cultofmac.com, APFS is available on macOS 10.12.4 as well, not just on iOS 10.3

    http://www.cultofmac.com/435718/apfs-new-apple-file-system/

    • In fact, APFS has been available on the Mac since the developer previews last summer – that’s why we posted this last summer. But unlike 10.3, macOS 10.12.4 does not arbitrarily migrate the Mac to the new file system. In fact, there’s no way *to* format a disk for APFS except from the command line – it’s not yet built into Disk Utility, not yet available for your boot volume, not compatible with Time Machine and a host of other limitations. APFS on the Mac is still a developer preview thing, and likely to remain that way until probably the release of whatever comes after Sierra (macOS 10.13).

      • You are quite right. Thanks.

        • You’re welcome! Also, their “you don’t have to backup first” advice is just dumb. Always backup before you make any major change to your computer or devices!

    • Ich Bins

      Hmmm. I’m on 10.12.4 and Disk Utility begs to differ…

      http://k-zone.org/files/filesystems.png

  • Haven’t heard much about APFS lately, and 2017 is fast-approaching. Curious what’s new and if we know of a solid timeframe for release.

  • Toni Lähdekorpi

    I’m guessing “APple File System”.

    • The Cappy

      “P” for persistent, as opposed to in-memory files.

  • Sean

    “APFS also adds some really cool features that we haven’t seen before in other file systems.” — Yeah, like what?

    64-bit “file IDs” (I assume you mean inodes): ZFS uses 128-bit, so this isn’t exactly revolutionary. Using 128-bit ensures that in *another* 30 years, when storage companies like Backblaze can talk about a zettabyte of data with a straight face and actually contemplate possibly having one on a single logical filesystem, ZFS will be able to support it, long after APFS has gone the way of HFS. Pretty much *all* modern filesystems (ReFS, btrfs, ZFS) are using at least 64-bit inodes.

    Cloning: This is basically just dedup. ZFS and a few other filesystems have supported this for a long time.

    Latency: Wouldn’t this be more related to the I/O scheduler algorithm of the XNU kernel, than the filesystem? It’s not like other filesystems completely ignore latency as a factor, anyway…

    File-level crypto: Supported for years on everything from NTFS to any filesystem on GNU/Linux desktop.

    Snapshots and COW: Another feature pioneered by ZFS that is now seeing wider adoption with btrfs and ReFS.

    Since ZFS was a thing on Mac OS X a long time ago, this isn’t even the first time most of these things are being done *on a Mac*. The only real innovation here is optimizing for SSDs (which I assume is perhaps a little more than just enabling TRIM support), which is only done in a very limited capacity on ZFS, ext4, btrfs, etc. Depending on exactly what SSD optimizations they’re doing, they could genuinely be introducing new filesystem tech. But we’ll have to wait and see. Noteworthy is that OpenZFS on FreeBSD has supported TRIM since 2012.

    In short: almost everything APFS does is not new to the filesystem world at large, and isn’t even really new to the Mac when you consider that ZFS was supported on the Mac starting in 2008-2009 or so.

    If Apple had proceeded full steam with adopting ZFS as their primary filesystem, or even started investing engineering resources into the OpenZFS project to make it better and improve on some of the limitations they identified at the time, then Apple users could have had an APFS-like filesystem much earlier, perhaps as early as 2010.

    What’s old is new again.

    • Steve__S

      Sean, your comments are valid, but they are missing the point. For starters, I don’t believe Peter framed APFS as breaking entirely new ground as compared to other files systems available. To be fair, his focus is comparing APFS to HFS+ and the laundry list of modern features included have generally been done elsewhere first. I don’t think anyone is surprised by this.
      That said, Peter is a journalist, not really a technologist. His overview of features is pretty much what you’d expect from a journalist… it’s essentially the regurgitation of Apple press coverage. So…. maybe you can cut him a break.
      ZFS is certainly a full featured file system. However, that doesn’t make it the best choice for Apple’s needs. ZFS really shines in server environments where storage pooling, data integrity and data redundancy are key design features. However, Apple’s new file system has to be optimized for everything from work stations down to mobile devices. ZFS is not the best fit for Apple’s design goals. ZFS has more overhead, it’s not really a fast performer either. Really, do you think ZFS would be a good choice for say… the Apple Watch?
      APFS is largely playing catch-up with the rest of the industry, but there are a few areas where it is rather cutting edge. For example, ZFS does encryption, but APFS was designed from the ground up around security. In terms of the level of granularity to the single and multi-key encryption, APFS has a clear advantage here. The things APFS is doing with space sharing and containers is rather novel as well. Even in terms of performance, the integration with the FTL (flash translation layer) is optimized for SSD performance. The point is, Apple has rather unique opportunities here since they control the entire technology stack. Simply porting over ZFS wouldn’t have allowed them to meet their design goals in the same way. That’s not a knock on ZFS. Rather, it’s an acknowledgement that ZFS and APFS were designed with different goals in mind.

      • Larry Towers

        OH YEAH another proprietary filesystem that isn’t functionally superior to any other file system. For anyone that cares about data retention and recovery the last thing we need is propagation of filesystems with negligible improvements

        • Steve__S

          Considering Apple is replacing their older proprietary file system with a newer one, I’m not sure I see what your issue is. Further, there are things that APFS seems to be doing with regard to fine grained and multi-key encryption seem to be cutting edge. As does their work with dynamic volume sizing without re-partitioning, etc. Finally, which existing file system is a better fit for Apple’s needs?

        • Rob

          Proprietary only for the moment.

          Apple has repeatedly stated that they plan to make APFS open source. In fact, the reference implementation is already available. Though it’s highly unlikely anyone will make a serious effort at re-implementing it on another platform until the spec is released.

    • tom123789

      “Latency: Wouldn’t this be more related to the I/O scheduler algorithm of the XNU kernel, than the filesystem?”

      The scheduler can only do so much, if the disk image isn’t designed for it. (After all, if the on-disk format were irrelevant, they could have just stuck with HFS forever.) You can look up filesystem performance benchmarks for Linux, and see that they often differ in performance by 10x, for some types of operations, even though they use exactly the same I/O scheduler.

      “It’s not like other filesystems completely ignore latency as a factor, anyway…”

      Most other filesystems prioritize throughput over latency. My guess is that’s because they’re built for servers, or sponsored by companies who build servers. APFS is the first modern filesystem I’ve seen that is specifically designed to prioritize low latency over high throughput.

      ZFS is an impressive design, but it was never intended to be run on a wristwatch (and in fact would not be so great there, due to its high RAM requirements). Despite what some old Sun whitepaper claimed, ZFS is not the last word in filesystems, any more than Java was the last word in programming languages.

    • Durandal_1707

      On the Mac, “File IDs” have traditionally referred to CNIDs, not inodes. In fact, HFS+ doesn’t even really have inodes; having predated OS X as it did, it wasn’t really built for a UNIX-like file system. Hard links on OS X are actually an enormously gross hack; all they did was stick an invisible directory (I think it was called “HFS+ Private Data”, but my memory may be off, as it’s been about a decade and a half since I looked at this) at the root of the drive. When you make a hard link of a file, the file gets moved into this directory, and that file is then the “inode”. The OS then makes aliases to this “inode” and instructs the FS drivers to treat the aliases as hard links (whether this is done via setting a flag, or whether the alias gets recognized as a hard link simply by virtue of its pointing to an “inode” file, I don’t remember). If you mount an HFS+ volume on an old Mac OS 9 system, you can see what’s really going on. It’s rather frightening, the massive number of files that get stuffed into that hidden directory.

      Anyway, long story short, the CNID points to the catalog node, not the actual file data. If you have two hard links to a file, they’ll both have separate CNIDs, but will point to the same inode. If you make an alias to one of the hard links, delete that hard link, and leave the other hard link intact, your alias will still be broken.

      As for cloning/dedup, it’s true that ZFS has this. The RAM requirements to use that particular feature in ZFS, though, are so unreasonably high that it might as well not.

      • Itzhac

        You are right.

        The implementation of hard links on HFS+ is a really dirty hack. According to http://rixstep.com/2/20040621,00.shtml and Rixstep’s app: GDE, there is no more “.HFS+ Private Data” in a APFS Volume.

        Maybe APFS treats hard links as multiple directory entries, as other file systems like.

        • Durandal_1707

          As APFS is a modern file system, I’m sure it has a native way to handle hard links. We won’t know exact details until the specification is released, which I don’t think it has been yet.

          I would discourage using Rixstep as a source of information, however. There is a lot of misinformation to be found on that site, particularly where file systems are concerned.

  • RustyDreams

    The APIs (Application Interfaces) that apps use to communicate with the file system will not change, with the exception of 4 of them. Almost all apps will have NOTHING to do to run on APFS volumes, their apps will just work. If an app uses one of the 4 APIs not supported, they’ll have a little bit of work to do, but is should not be a major headache to them. Disk Utilities will have to support APFS with all brand new code, and they’ll have to wait until APFS is finished, which it is not, to really get much done on all that new code.

    • Echo

      Agreed, but for an app like Backblaze, designing new ways to interact with snapshots could have a huge advantage.

  • Discpad

    Peter Cohen: One huge question I have is, will APFS have a built-in feature to cut down on write amplification on SSD’s? See “The Cleaning Lady and Write Amplification” at:
    http://www.anandtech.com/show/2829/4

    This is a problem when running any version of Windows NT (a/k/a OpenVMS for kiddies), and is why you need a 3rd party file defragger such as Raxco PerfectDisk to manage it. See: “How to Extend the Life of Your SSD Hard Drive” at:
    blog.raxco.com/2012/12/28/how-to-extend-the-life-of-your-ssd-hard-drive-part-1/
    Dan Schwartz,
    Editor, The Hearing Blog
    http://www.TheHearingBlog.com

  • Discpad

    Just a quick correction: HFS+ is not supported on floppy disks. This I know because I still support a Quadra 650 running System 7.6.1 (with AFP/IP from MacOS 8.0) for Pagemaker 7!

  • SteveBlowJobsSucksDickInHell

    So what. Yet another stupid crApple post from backblaze’s own hipster iSheep douche. Why no article about ReFS or Btrfs or ZFS? But as soon as crApple finally gets around to making a modern file system after everyone else already did many years ago, you praise them as if they are doing something innovative. crApple has been behind all other tech companies for almost ten years now. Just stop with all the crApple ass kissing already!

    • Milk Manson

      You’re doing the same exact thing, just pushing in the other direction. Who cares. Get a life.

    • Not sure what defaming and name-calling in a blog post about file systems is accomplishing. I suggest an anger management class or taking your meds, maybe both. If you don’t like Apple, maybe go read articles about things you do enjoy. You’ll feel better.

    • taitaisanchez

      Because with iOS now moved to APFS, there’s more end users using APFS than there are using Re, BTR or ZFS? Android uses ext4, and Windows just hasn’t moved from NTFS. This is the first new end user facing file system since NTFS was rolled out with Windows XP to regular users.

    • John Marcus

      Are you still in high school?

  • pixelmixture

    does this mean that backblaze boxes will be ported to osx ?

    • Not at this point – we’re quite content managing multiple operating systems for our hardware depending on our needs. APFS certainly paves the way for us to do interesting stuff with the client software in the future, though!

      One of our founders, Brian Wilson, explained a number of years ago his own philosophy towards writing cross platform code. Here’s a link to it if you’d like to read it.

      https://www.backblaze.com/blog/10-rules-for-how-to-write-cross-platform-code/

  • Stefan

    Does this mean that all programs have to be rewritten to work with the new file system?

    • Tex

      No. It’s all behind the scenes. About the only thing that MIGHT have to happen, is the programs need to account for case in paths/file names.

      • Stefan

        OK – thanks.

        • Pretty seamless too, from what I’ve found.