Saving 16GB of small memory: Understanding Apple's new file system APFS

Saving 16GB of small memory: Understanding Apple's new file system APFS

APFS is Apple File System, which was launched at WWDC 2016. Starting this year, it will replace the current file system HFS+ used on Apple Watch, Apple TV, iPhone, iPad, MacBook, iMac and Mac Pro.

The macOS Sierra developer preview that Apple launched at WWDC last year used APFS, and in iOS 10.3 Beta, Apple finally made APFS available for testing on the iPhone.

Many people don't need to know too much about APFS, it's just an implementation detail for end users. Future features involving this file system, such as smarter backups and faster updates, as well as some features we haven't thought of yet, will slowly come.

Of course, if you are interested in this file system, let's learn some information about APFS.

Why is Apple replacing HFS+?

HFS+ has been in use for nearly 20 years since 1998, and in order to keep up with modern computer computing instructions, HFS+ has been continuously updated over the past period of time.

Since then, HFS+ has been used throughout Apple devices. It has gone from kilobytes to megabytes to gigabytes to terabytes. We have also gone from hard drives to SSDs, from physical installations to digital downloads, and from manual backups to Time Machine and iCloud.

HFS+ and its team have kept it alive along the way, but as time goes by, to move forward, you always need something new to break the old rules.

What makes APFS more consistent?

HFS+ now runs on all Apple devices, but the way it is implemented differs between devices, including some key areas such as encryption. This means different source code and separate maintenance and development.

APFS enables Apple platforms to scale more consistently, both now and in the future, by allowing a single code base to use fewer resources to develop and maintain, and by allowing it to evolve faster and better.

Is APFS faster?

Most issues involving speed are about perception. It’s always faster to grab a drink from the table next to you than from your fridge. APFS does some of the work to make your Apple device feel faster.

APFS, with a greater emphasis on low latency, prioritizes tasks such as app launches and data transfers. It's also faster at resizing directories.

How does APFS fit better with SSDs?

Apple said APFS has been rewritten to be more compatible with devices equipped with SSDs, the flash memory chips currently used in Apple Watch, Apple TV, iPhone, iPad, MacBook and high-end desktop Macs.

APFS is optimized for SSDs and supports the TRIM command, which helps users who delete a large number of files and frees up a lot of space for users.

Snapshots and backups

Two important features of APFS are snapshots and backups. The snapshot function can "fix" the state of the file system at the moment of creating the snapshot, and continue to access and modify the file system while retaining the fixed state. This technology can only record new or modified data blocks, so multiple snapshots can be created for the file system without worrying about taking up a lot of storage space. Backup tools (such as Time Machine) usually use this feature to record changes to the file system since the last backup, and can be used to back up data more efficiently without interrupting user operations.

Does APFS help with storage space?

For macOS users who use partitions, APFS solves a long-standing limitation. HFS+ requires a fixed-size capacity to be pre-allocated for each file system, which is a relatively "rigid" approach, while APFS's space sharing function allows users to dynamically and flexibly expand or reduce volume capacity without repartitioning.

APFS also supports sparse files, so storage is allocated only when it is actually needed.

Data integrity and crash protection

APFS has an advanced level of preservation that has to do with the way it handles file writes. They are treated as if they were complete or as if they were never there. In other words, new versions of files are created using copy-on-write, and the old versions are released only if the save succeeds.

Is APFS encryption better?

Security and privacy are the design foundations of APFS. Encryption is a feature natively supported by APFS, and users can choose any of the following encryption methods for each volume: no encryption, unified encryption with a single key, or multi-key encryption (encrypting each file with a dedicated key and a separate key for sensitive metadata). Multi-key encryption ensures the integrity of user data even if the physical security of the device is compromised. Depending on the specific hardware, APFS encryption can use AES-XTS or AES-CBC algorithms.

What Doesn’t APFS Also Include?

APFS is still in beta, which means it won’t support everything yet. At this stage, there are some things that are not yet supported by APFS.

Boot disk

Time Machine

FileVault

Fusion Drive

Will APFS be open source?

APFS is not yet open source. In the past few years, Apple has gradually become open and has open sourced several projects, such as Mach Kernel, WebKit, LLVM, and Swift. As for whether it will be open source in the future, we can only wait and see.

As a winner of Toutiao's Qingyun Plan and Baijiahao's Bai+ Plan, the 2019 Baidu Digital Author of the Year, the Baijiahao's Most Popular Author in the Technology Field, the 2019 Sogou Technology and Culture Author, and the 2021 Baijiahao Quarterly Influential Creator, he has won many awards, including the 2013 Sohu Best Industry Media Person, the 2015 China New Media Entrepreneurship Competition Beijing Third Place, the 2015 Guangmang Experience Award, the 2015 China New Media Entrepreneurship Competition Finals Third Place, and the 2018 Baidu Dynamic Annual Powerful Celebrity.

<<:  The flagship of domestic products, both intelligent and brave, Fangcheng Baobao 8 is officially launched, with a starting price of 379,800 yuan

>>:  Andreessen Horowitz: DeepSeek rockets to second place in the global generative AI consumer application rankings by 2025

Recommend

How does MissFresh conduct private domain operations?

In the past, when we went to the supermarket to b...

Which fruits are not sweet but can easily make people gain weight?

Hot weather, no appetite Have some fruit Some peo...

How many steps are needed to create a person?

“ A mad scientist collected bones, viscera and va...

This great achievement in the history of mathematics is attributed to the Arabs?

This article briefly introduces the early develop...

AMD graphics card made by “girlfriend”?

GlobalFoundries (GF for short) is a company separ...

The big guy wants to "lose weight" Lincoln's new Navigator latest news

Recently, overseas media reported more news about ...

Traffic, winners, paid future... this year of content entrepreneurship!

The top picture of this article is Luo Zhenyu, th...

Analysis of user operation strategies of Taobao Live

Since its launch in 2016, Taobao Live has firmly ...

The display effect of 4.7-inch iPhone 6 is like this

What will the iPhone 6 UI look like after it becom...