With APFS, Apple focuses on storage efficiency in its OSes

17.06.2016
Apple this week announced that macOS Sierra, its newest operating system for the Mac and the successor to OS X El Capitan, will include the next-generation Apple File System (APFS) and a bounty of data storage features for SSDs.

The new APFS will operate as a file system across all the company's platforms, including iOS, macOS, tvOS and watchOS, Apple said during a keynote at its WWDC 16 conference in San Francisco.

The new APFS includes data cloning for files and directories, as well as data snapshots, which offer a read-only instance of a file system on a volume.

Snapshots have been used for more than a decade as a data resiliency strategy in data centers because they can be used to make backups work more efficiently, and they allow systems to be restored to a given point in time.

Apple said its new OS and file system is optimized for NAND flash (SSD) storage,  features "strong encryption" and will free up SSD space by automatically migrating older, rarely used files to Apple's cloud storage service.

Apple listed a plethora of older files that could be automatically migrated, including previously read ePub books, screenshots, full resolution photos, home and iTunes videos and podcasts, spreadsheets, Mac App Store apps, presentations and text/word processing files.

Rob Enderle, principal analyst at the Enderle Group, said he's not sure consumers will need or even want a device that automatically migrates their files and photos offline.

"Storage features on PCs are very difficult to sell," he said via email. "These may be features IBM and Cisco asked for, but they will likely have to market them for people to care and neither has done any user focused marketing for some time having divested or shut down their consumer/user focused efforts."

For BOYD users in the workplace, the automatic migration feature might even violate corporate security policies, Enderle said.

"As for the software automatically moving old files into the cloud, isn't this the same new feature of iTunes that got users so upset recently" said Jim Handy, principal analyst at market research firm Objective Analysis. "Is it a good thing to do that on a computer"

Technically, Handy said, anything that frees up space on the SSD or a hard disk drive "should be a good thing," as drives perform faster with more free capacity on which to write.

"This is an issue for iPhone users: The automatic software updates nibble away at the iPhone's storage until there's so little left that the device barely functions -- even if you have removed all of your own pictures, music, videos, and downloaded apps," Handy said.

APFS's snapshot and replication features, Handy said, are two important storage services that data center storage area networks (SANs) support. But he also cautioned that they're only as good as the second storage device to which they copy.

"If this is an OS for laptops..., then neither of these make sense, unless all the snapshots and replication are copied to the cloud. If that's the case, there will be many cases when these won't be helpful because of a lack of connectivity," Handy said.

Handy also questioned why Apple would need to create an encryption function in its file system when many SSDs today come native with the feature. "Roughly half of all of today's SSDs are already self-encrypting. It doesn't cost appreciably more," he said.

Apple did not respond to a request for comment by Computerworld on its new file system's features.

According to Apple's AFPS guide, the system allows users to choose several encryption modes for each volume in a container, including: no encryption, single-key encryption or multi-key encryption with per-file keys for file data and a separate key for sensitive metadata. APFS encryption uses AES-XTS or AES-CBC, depending on hardware.

In its desktop OS, full-disk encryption has been available since OS X 10.7 Lion. In iOS, a version of data protection that encrypts each file individually with its own key has been available since iOS 4, according to the iOS Security Guide. "APFS combines both of these features into a unified model that encrypts file system metadata," Apple's guide said.

In terms of SSD optimization, APFS -- like HFS+ on which it is based -- supports TRIM operations, which delete blocks of data no longer in use in order to free up capacity.

"On APFS, TRIM operations are issued asynchronously from when files are deleted or free space is reclaimed, which ensures that these operations are only performed once metadata changes are persisted to stable storage," Apple said.

Apple also introduced "Space Sharing" in APFS, which allows multiple file systems to share the same underlying free space on a physical volume.

"Unlike rigid partitioning schemes, which pre-allocate a fixed amount of space for each file system, APFS volumes can grow and shrink without volume repartitioning," Apple said.

Each volume in an APFS container reports the same available disk space, which is equal to the total available disk space of the container. The feature is similar to another used by enterprises called "thin provisioning," which uses virtualization to give the appearance of having more capacity than what is actually available.

Thin provisioning allows volumes to grow or shrink as needed, instead of creating fixed volume sizes as storage administrators once did.

For example, Apple said, an APFS container with a capacity of 100GB that contains volume A, using 10GB, and volume B, using 20GB, would report the free space for both volumes A and B is 70GB.

The base storage unit for APFS is a container, which generally maps 1:1 to GUID Partition Table (GPT) entries and manages its own space allocations and crash protection scheme, according to Apple's APFS developer's guide.

(www.computerworld.com)

Lucas Mearian