What is APFS (Apple File System for macOS)?
APFS (Apple File System) is a proprietary system for organizing and structuring data in a storage system. APFS, which Apple originally released with macOS High Sierra, replaces the 30-year-old HFS+ system previously used on Macs.
HFS+ and HFS (an earlier version of Hierarchical File System) were developed in the days of floppy disks, the primary storage medium for Macs, when spinning hard drives were an expensive third-party option.
Apple has toyed with replacing HFS+ over the years. Eventually, APFS, already included in iOS, tvOS, and watchOS, became the default file system for Macs running macOS High Sierra and later.
Note: APFS is included in macOS Catalina (10.15), macOS Mojave (10.14), and macOS High Sierra (10.13), as well as in iOS 10.3 and later, tvOS 10.2 and later, and watchOS 3.2 and later.
Optimized for Modern Storage Technology
HFS+ was implemented when 800KB floppies were king. Today's Macs don't use floppies, and spinning hard drives are starting to look just as archaic. With Apple's emphasis on flash-based storage in all of its products, a file system optimized to work with spinning media, and the inherent latency of waiting for a drive to spin up, no longer makes sense.
APFS designed by Apple from the ground up for SSDs and other flash-based storage systems. Although APFS is optimized for solid state storage, it works well with modern hard drives.
Future Proof
APFS supports a 64-bit inode number. The inode is a unique identifier that identifies a file system object: a file or a folder. With a 64-bit inode, APFS can hold around 9 quintillion file system objects, exceeding the previous limit of 2.1 billion.
Nine quintillion is a big number, and you may rightfully wonder what storage device has enough space to store that many objects. The answer requires looking at storage trends. Consider this: Apple has already begun porting enterprise-grade storage technology into consumer-grade products, like the B. Mac and its ability to use tiered storage. This was first seen in fusion drives, which move data between a high-performance SSD and a slower but much larger hard drive. Frequently used data stays on the fast SSD, less frequently used files on the hard drive.
With macOS, Apple expanded on this concept by adding iCloud-based storage. Allowing users to save previously watched movies and TV shows to iCloud frees up local storage space. Although this example does not require a uniform inode numbering system for all disks used by this tiered storage system, it does show a general direction that Apple is taking to bring together multiple storage technologies that best suit user needs and have operating systems. view them as a single file space.
APFS Features
APFS has a number of features that distinguish it from older file systems.
- Clones: Clones allow you to make near-instantaneous copies of files without taking up additional disk space. Instead of copying a file piece by piece from one place to another, clones refer to the original file and share the data blocks that are identical between the two files. Make changes to a file and only the changed data block is written to the new clone, while both the original and the clone continue to share unchanged data blocks. Not only does this make copying and saving files exceptionally fast, it also saves disk space.
- Snapshots: APFS can create a volume snapshot that represents a point in time. Snapshots make it easy to perform efficient backups and allow you to go back to a specific point in time. Shadow copies are read-only references to the original volume and its data. A new snapshot does not actually take up any disk space, other than the amount of disk space needed to store a pointer to the original volume. As time passes and changes are made to the original volume, the snapshot is updated with only the changes that occur.
- Encryption: APFS supports strong disk encryption in AES-XTS or AES-CBC mode. Both files and metadata are encrypted. Supported encryption methods include: Clear (no encryption)
- single key
- Multikey, with keys per file for data and metadata
- Space Sharing: Space Sharing puts an end to predefining partition sizes. Instead, all volumes share the underlying free space on a drive. Sharing disk space allows multiple volumes on a drive to dynamically grow and shrink as needed without the need for repartitioning.
- Copy-On-Write: This data protection scheme allows sharing of data structures as long as no modification is made. Once a change (write) is requested, a new unique copy is made to ensure that the original remains intact. Only after the write is complete is the information in the file updated to refer to the latest data.
- Atomic Safe-Save: This is similar to the copy-on-write idea, but applies to all file operations, e.g. B. rename or move a file or directory. Using renaming as an example, the file to be renamed is copied with the new data (the file name). Only when the copy process is complete is the file system updated to point to the new data. This ensures that the original file remains intact if the write operation is canceled for some reason, such as B. a power failure or a CPU problem - it does not complete.
- Sparse Files – This more efficient way of allocating file space allows file space to grow only when needed. In non-sparse file systems, file space must be reserved in advance, even if there is no data ready to be stored.
Comments
Post a Comment