You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

APFS disks and optimization... unnecessary?

We used to use DiskWarrior and the like to optimize/rebuild directories on our Mac OS Extended volumes for years. Then Apple moved to APFS. It's been years now and it looks like those utilities will eventually be relics of the past.


I see a lot of stuff online about why those old tools can't be used to optimize directories on APFS but nothing about whether it's even required with APFS volumes.


Does Disk Utility optimize and rebuild APFS directories?

Do APFS directories even require optimization?


I have a few Mac OS Extended volumes remaining form the "old days" and if APFS is that dependable and those tools are no longer required I will convert those volumes to APFS and remove those tools.

iMac Line (2012 and Later)

Posted on Sep 29, 2021 12:39 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 29, 2021 1:39 PM

Apple has been supporting HFS for decades and it has grown old and crufty with a lot of features grafted on over the years. Prior to it being journaled it was notorious to have data corruption. Apple knew they had to do something for the future. At one point, Apple was considering switching to ZFS from Sun Microsystems, now Oracle. ZFS was another entirely new file system which was rather revolutionary and scalable to a Zetabyte system in large server environments. There was some limited support for ZFS added to Mac OS X by 3rd parties and Apple was deep into working ZFS into Mac OS Server on internal non-public builds. A business decision was made to create their own file system instead of adopting ZFS. There might have been some licensing concerns and some technical issues.



Most of the useful features found in ZFS such as copy-on-write, data integrity, snapshots, etc. were implemented in APFS. While ZFS is not terribly optimized for SSD storage APFS definitely is.


  1. Ability to save snapshots of the OS
  2. Optimization for flash storage improves file transfer speeds and device longevity
  3. Checksum values to file system metadata prevents and mitigates file corruption
  4. Space sharing makes all partitions dynamic instead of static, allowing them to grow and shrink on the fly
  5. Volume container encryption supports both single-key and multi-key encryption
  6. Sparse file support allocates storage only when the user needs it, allowing users to create logical volumes larger than the physical volume containing them
  7. Fast directory sizing quickly computes available space


Basically, APFS is a modern file system that takes care of all it's own maintenance so you do not have to worry about it. The operating system has built-in tools to repair APFS and Disk Utility runs the command line apfs_fsck repair tool. 3rd parties who write file system tools haven't really obtained the information necessary from Apple to build recovery tools that might go beyond Apple's built-in tools. They have to reverse engineer it for the most part. There are some data recovery 3rd parties but not many. Always backup any form of storage.



Similar questions

13 replies
Question marked as Top-ranking reply

Sep 29, 2021 1:39 PM in response to johnnyjackhammer

Apple has been supporting HFS for decades and it has grown old and crufty with a lot of features grafted on over the years. Prior to it being journaled it was notorious to have data corruption. Apple knew they had to do something for the future. At one point, Apple was considering switching to ZFS from Sun Microsystems, now Oracle. ZFS was another entirely new file system which was rather revolutionary and scalable to a Zetabyte system in large server environments. There was some limited support for ZFS added to Mac OS X by 3rd parties and Apple was deep into working ZFS into Mac OS Server on internal non-public builds. A business decision was made to create their own file system instead of adopting ZFS. There might have been some licensing concerns and some technical issues.



Most of the useful features found in ZFS such as copy-on-write, data integrity, snapshots, etc. were implemented in APFS. While ZFS is not terribly optimized for SSD storage APFS definitely is.


  1. Ability to save snapshots of the OS
  2. Optimization for flash storage improves file transfer speeds and device longevity
  3. Checksum values to file system metadata prevents and mitigates file corruption
  4. Space sharing makes all partitions dynamic instead of static, allowing them to grow and shrink on the fly
  5. Volume container encryption supports both single-key and multi-key encryption
  6. Sparse file support allocates storage only when the user needs it, allowing users to create logical volumes larger than the physical volume containing them
  7. Fast directory sizing quickly computes available space


Basically, APFS is a modern file system that takes care of all it's own maintenance so you do not have to worry about it. The operating system has built-in tools to repair APFS and Disk Utility runs the command line apfs_fsck repair tool. 3rd parties who write file system tools haven't really obtained the information necessary from Apple to build recovery tools that might go beyond Apple's built-in tools. They have to reverse engineer it for the most part. There are some data recovery 3rd parties but not many. Always backup any form of storage.



Sep 30, 2021 8:54 AM in response to majortom1967

@majortom1967


No doubt about it, Disk Warrior has saved many broken directories that Disk Utility couldn't fix over the years.


I have version 1.0, 3.0, 4.0, 5.0 licenses. Been using it a long time, but if the tool is no longer required then it's no longer required.

It's still not compatible with Big Sur... that's a little surprising. I just moved to Big Sur this month.... I always wait for the final version of macOS before I adopt it.

Sep 30, 2021 2:58 PM in response to johnnyjackhammer

Just a word of caution in case you are using traditional hard drives ... and esp. if you use them for high-performance needs such as video editing or you need to preserve multiple copies and/or multiple versions of a file. APFS stores data very differently from HFS+ and was designed/optimized for SSD storage.


I suggest reading up on APFS cloning (aka copy on write), file enumeration and file data storage. These articles are decent starting points:


Copy, move and clone files in APFS, a primer

Using APFS On HDDs … And Why You Might Not Want To

An analysis of APFS enumeration performance on rotational hard drives


Just some cautionary information for anyone considering a wholesale leap into APFS on data drives.

Oct 15, 2021 12:31 PM in response to johnnyjackhammer

DiskWarrior (versions 1 to 5) is awesome for HFS+. It saved many disks at our University over the years. But it does not work on APFS. APFS is much robust than HFS+, but still it would be great to have applications like DiskWarrior to rebuild its directory, just in case.


But unless Apple releases documentation and API for APFS (as available for HFS+), developers like Alsoft (DiskWarrior), Micromat (TechTool Pro) and Prosoft Engineering (Drive Genius) will not be able to release applications to rebuild the directory of APFS. So, it all depends on Apple. Time will tell.

APFS disks and optimization... unnecessary?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.