You might not care a whole ton about your computer’s file system. And yet, it’s the core structure underlying a user’s experience with the operating system. Apple has been working on an update to their file system, called Apple File System, or APFS. The official release of APFS should come in 2017, but here’s a collection of features we’ve seen in the developer preview from October.

apple file system

Not these kinds of files, but close.

A file system is the basic structure an operating system uses to store and retrieve data. In the beginning, file systems were just lists of what data was located where. As hardware has improved and computational power has increased, newer file systems have added many bells and several whistles to that basic concept. Today, a modern file system would not be complete without dozens of other options.

However, like a lot of infrastructure, file systems are only rarely updated and even more rarely overhauled. HFS+, the file system that ships with new Macs today, is eighteen years old. HFS, its progenitor, is pushing thirty. It’s sort of like a nineties Toyota. It might still run with 500,000 miles on the odometer, which is pretty impressive, but you wouldn’t want to pick up your prom date with it.

Apple File System is the new version of HFS+, and will eventually be the standard for all Apple-made devices. However, APFS isn’t so much an upgrade to HFS+ as it is a quantum leap forward to the present day. Though it’s a major upgrade for Apple users, most of the new features in APFS have existed in other file systems for a while now. Nevertheless, the update isn’t a day too soon.

And Jon Siracusa was, of course, a little excited. I think they even rang a bell at WWDC when it was announced, which long-time listeners of Accidental Tech will appreciate.

 

apple file system cloning

APFS uses a scheme called copy-on-write, or COW, to instantly clone files. When a user or application duplicates a file under HFS+, the entire file is copied, bit for bit, immediately. This is slow, and it takes up a lot of disk space. APFS instead creates a clone by manipulating metadata and allocating disk space. That’s a simple operation, and it can happen instantly.

However, this doesn’t actually copy any bits. Instead, APFS says “hold this space for a copy of this file” but doesn’t do any writing. Not until the clone diverges from the original are any bits written. And even then, only the changes from the original file (called the “deltas”) are written to disk.

apple file system snapshots

Snapshots are also provided courtesy of COW architecture, and you might be sensing a theme here. COW is a big change for APFS, and it changes the way a lot of core disk processes work.

A snapshot is a read-only, mountable image of a file system at a given point in time. As the file system changes, only modified bits, or “deltas,” are saved. This means that backing up your system can be faster and more reliable, with smaller images that don’t eat up whole disks. This feature is poised to revolutionize Time Machine, but its effectiveness with depend on implementation.

apple file system qos

Next stop, the future!

You may have seen the term Quality of Service (QoS) in your router’s setup instructions. To keep data moving quickly, QoS prioritizes data packets from difference sources. On a router, for example, you would set up some QoS rules that prioritize certain types of traffic – Netflix, for example – and the router would make sure those packets got all the bandwidth they needed. Reportedly, Apple is implementing a similar QoS architecture in APFS, prioritizing user operations such as active windows. Background tasks would wait until a period of low user load to do their thing. So, maybe less beach balls?

apple file system encryption

Lock up your CDs, guys.

 

In a world where anyone can be listening, digital encryption has become something of a moral issue. And with the emphasis Apple has been placing on security, it’s no surprise that APFS should feature native encryption. While Apple has long allowed whole-disk encryption under macOS, with APFS, Apple will be introducing a more sophisticated approach. Users can use a single key to encrypt all their data or use multiple encryption keys to lock individual files and folders separately.

apple file system partition resizing

 

Under APFS, logical disk partitions can resize themselves. This means that users only need to specify the number of partitions they want on a drive. Then, APFS wills out how big those partitions should be based on their contents. Each partition only occupies disk space that it’s using to store files, and the file system works out disk allocation on the fly. It’s similar to the way the OS handles directories, but at a more fundemental level.

So what does the average consumer care about a new file system? Truth is, APFS is definitely in the alpha nerd stage. The features that APFS makes available could have a cascading effect, allowing programs to do more and run more efficiently, but we won’t see that for a while yet.

And as great as an upgrade is, not everything made the cut. Native compression is notably absent, as is checksumming on user data. This could still change, but don’t hold your breath.

The post What is Apple File System? appeared first on Apple Gazette.