Last Week on My Mac: Happy birthday APFS

In ten days, Apple’s APFS file system will celebrate its second birthday, as it was first released in iOS 10.3 on 27 March 2017. Unleashing a brand new file system in release operating systems with so many users and third-party products was very high risk. Although APFS has had its moments, Apple seems to have pulled it off.

There was no doubt of the need for a new file system for Apple’s computers and devices. HFS+ had served us well for longer than many of its users had been alive (since 1998), but was showing signs of its age and focus on traditional low-capacity magnetic storage. The first candidate as replacement was Sun’s ZFS, which might have proved ideal for more complex macOS systems, but was considered far from optimal for smaller devices. Apple then chose to go it alone and develop something completely novel, APFS – one file system to rule them all, intended primarily for SSD.

Among its other goals are to put encryption at its heart, to remove the need for journalling, and to eliminate what was seen as unnecessary overhead by avoiding normalisation of file and directory names. The last of those was nearly its early undoing too; despite warnings from developers, its first releases tried to ignore the issues of normalisation. It was only when this was found to break non-Roman language versions of Apple’s own apps that ‘native normalization’ was retrofitted, and using languages such as Korean became sweetness and light.

Roll-out was accomplished by an ingenious in-place migration process, performed on a massive scale. By the middle of April 2017, a large proportion of iOS devices had not only undergone this as part of the iOS 10.3 update, but most of their users were barely aware of what had happened. Now there’s probably about a billion devices which run solely on APFS, and around 25-50 million Macs. It must have been the largest deployment of a new file system in history.

The best indicator of the success of APFS is the exceptionally few user complaints and remaining issues. As someone who for around thirty years has answered user questions for publications like MacUser and now MacFormat, I used regularly every week or two to receive questions from those who had run into problems with HFS+. These typically started small and just grew and grew until they couldn’t be repaired, even in ‘single user mode’ (SUM). Many of us periodically started up in SUM and ran fsck there to prevent that from happening to our boot volumes.

For the Q&A writer, APFS has been a disaster: I can’t recall when I was last questioned what to do after a file system failure. It’s just as well, because Apple’s delay in providing full documentation of APFS has made it almost impossible for data recovery services and those who develop file system utilities to handle APFS storage. What was published last September has been much more helpful, but is still abominably sketchy in parts, despite two subsequent revisions.

APFS has brought real benefits for many users. These include flexibility in volume sizing, near-instant snapshots which have been built into Time Machine backups, and can be encrypted, fast ‘cloning’ copies on the same volume, copy-on-write, and enabling high performance in the T2 chip as a disk controller, with inline support for encryption.

Three of the original features claimed of APFS remain more dubious. Saving physical storage space with sparse files doesn’t appear to have had much impact, perhaps because most modern file formats try to avoid storing sparse data. Fast directory sizing seems not to have been implemented at all in directories, which is frustrating as it’s sorely needed in most folders which the user frequents.

Support for Apple’s popular Fusion Drives also remains in question. This was delayed by a year, until the release of Mojave. Apple offers only limited insight into how these are used when running APFS, where the SSD component stores all file system metadata for the combination, and seems to act much as a large cache for reading and writing to the hard disk. Whether this is an improvement over the previous CoreStorage and HFS+ remains to be seen, as does its effect on the life of the SSD component in the Fusion Drive.

APFS 1.0 in High Sierra evolved rapidly, and its second version in Mojave is considerably more mature. After a lot of initial debate about its performance, I have surprisingly been unable to find good data for Mojave. APFS does support rotating hard drives, but there is almost no evidence as to how well it performs defragmention on them, nor of overall performace compared with HFS+. Most users who want improved performance now seem happy to pay the premium for SSD anyway.

Today’s APFS in Mojave and on devices seems to have met if not exceeded expectations of both Apple and users. The only two situations in which users are likely to opt for HFS+ are in backup storage for Time Machine, where the older format is still obligatory, and on external storage which must be usable from macOS Sierra and earlier. APFS has survived its bold introduction, got tweaked to fix normalisation problems, and has shaken out the great majority of its bugs. It is a worthy successor to HFS+, and delivers the goods.

Now we need to consider its tools like Disk Utility, and of course the future of Time Machine.