APFS vs. HFS+: Why APFS is Superior File System
In this article, we delve into the world of file systems, comparing APFS (Apple File System) with its predecessor, HFS+ (Hierarchical File System Plus). We’ll explore the various advantages that APFS offers over HFS+, including enhanced performance, improved reliability, and advanced features such as snapshots and cloning. Whether you’re a Mac user or simply interested in storage technologies, this video will provide valuable insights into why APFS is the superior choice for modern computing.
- 1. Introduction
- 2. Cloning and compression
- 3. Snapshots
- 4. 64-bit architecture
- 5. Disk encryption
- 6. Space Sharing
- 7. New timestamps
- 8. Journaled operations
- Conclusion
- Questions and answers
- Comments
1. Introduction
HFS+ came into usage in early 2000s and was soon outdated, as it was only an improved version of HFS. It made simple operations too long, and didn’t use device memory efficiently. To solve these and other issues, the new APFS system was designed. It introduced considerable changes in comparison with the predecessor.
Characteristic | HFS+ | APFS |
---|---|---|
Year Released | 1998 | 2017 |
Type of File System | Disk | Modern, designed for SSDs |
Encryption | Limited | Built-in, full encryption support |
Performance | Good, but slower on SSDs | Optimized for speed on SSDs |
File Cloning | No | Supported, efficient space usage |
Scalability | Limited | High, supports large data volumes |
Undo Changes | No | Supported, ability to revert to previous versions |
Data Structure | Block-based | Object-oriented |
Compatibility | macOS and older iOS versions | macOS, iOS, tvOS, watchOS |
Metadata | Limited | Enhanced, improved data management |
2. Cloning and compression
Thanks to the new functions such as cloning (copying a file or directory instantly, which doesn’t require additional disk space to store data) and compression (which helps to save disk space and increase write speed), the overall system performance has improved. Now applications can open faster and the overall system response time has been reduced.
One more advantage is quick copying while saving disk space. Clones are created but they take as much space as required for one file, instead of the two. If there are any changes made to the clone, only changed data is written to disk, while the rest of the file is based on its original version. This simple algorithm helps to save disk space considerably.
3. Snapshots
Thanks to using snapshots (point-in-time, read-only instances of the file system) backup operations take much less time. Now the operating system can use snapshots to make backups more efficient, which lets Time Machine work faster.
4. 64-bit architecture
Unlike HFS+ based on 32-bit architecture, APFS uses 64-bit structure. In simple words, APFS can store a lot more files than its predecessor: about 9 quintillion files in every volume, which must be more than enough for a dozen of years.
5. Disk encryption
In addition to the generally faster and more stable operation, users will gain access to secure disk encryption tools. Any files can be protected with one or several keys.
6. Space Sharing
With the Space Sharing feature, all volumes of a disk can share their free space. For example, if a volume has insufficient space to accommodate a file, it will use some space from another volume automatically.
Here is how the file system is designed: the operating system creates a container on the hard disk. This container holds one or several partitions (volumes), each of them having its own structure (the space of names, and a set of files and directories) for storing data, links to file and folder locations, and the root directory containing the data.
In comparison to its predecessor, HFS+, if you format the disk to have one or several volumes, the new file system assigns a fixed size to every volume, and this size is determined at the time of creation. Under certain conditions, this size can be modified without losing data, but too often, such conditions do not apply to the size you’d like to enlarge.
APFS removes most of those size limitations and lets volumes to make use of any free space available on the disk. This way, any space which is unused can be assigned to any volume where it is needed. There is only one exception – volumes have to be located inside one container.
7. New timestamps
Enhanced features for working with removable devices let users transfer and read information much faster which reduces the number of possible write errors.
In APFS, the accuracy of timestamps has been improved considerably, and now it supports time stamping accurate to the nanosecond, While HFS+ was limited to a second timestamp resolution.
8. Journaled operations
Here is one more improvement: APFS uses the “copy-on-write” principle to guarantee that all changes and entries to the journal will get synchronized all the time, and if the operating system crashes unexpectedly or there is a power-off, nothing at all is going to happen to the data on your disks.
It applies both to the desktop-designed macOS and mobile iOS platforms – thanks to APFS, iPhone will no longer get bricked if something goes wrong with another update.
As ApFS is optimized for SSDs, the speed of access to the flash drive will be considerably higher when compared to HFS +.
For conventional hard disks, though, the increase in performance will be insignificant. Test results for an ordinary HDD:
FS | Read | Write | Read (IOPS) | Write (IOPS) |
---|---|---|---|---|
HFS | 85.15 | 85.37 | 81.2 | 81.4 |
ApFS | 85.29 | 85.98 | 81.3 | 82 |
Conclusion
All in all, it can be said that APFS appears to be much better than the previous file systems, as it was designed with SSDs in mind and should perform amazingly on new Apple devices. In the end, the new operating system guarantees improved performance, better security thanks to the built-in encryption technology, and enhanced reliability due to the new crash protection mechanism and the simplified data backup plan.