Post Syndicated from Peter Cohen original https://www.backblaze.com/blog/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.
The post APFS: What You Need To Know About Apple’s New File System appeared first on Backblaze Blog | Cloud Storage & Cloud Backup.