Mike's picture by Mike | September 12, 2019

 

My APFS-formatted rotational disks have always felt slower than when they were HFS+ formatted. The speed of copying files to them felt about the same, but slogging through folders in the Finder was taking a lot longer. At first I shrugged it off to the filesystem being new; "It just needs some tuning, it will come along." But that performance hasn't come along, and after running some tests and collecting a lot more data, I'm convinced that Apple made a fundamental design choice in APFS that makes its performance worse than HFS+ on rotational disks. Performance starts out at a significant deficit to HFS+ (OS X Extended) and declines linearly as you add files to the volume.

The rest of this article is fairly technical, here are the key takeaways:

  • Enumerating an APFS filesystem on a traditional HDD (rotational disk) will take 3-20X longer than HFS+ on the same hardware.
  • This performance difference is most noticeable on a macOS startup disk that is (or includes) a rotational disk.
  • If Apple doesn't make some concessions in the APFS filesystem to accommodate the slower seek performance of HDD devices, then a rotational device will never be able to provide acceptable performance as a production macOS startup disk.

Test Setup

I wanted to see how an APFS formatted volume performs over time under "normal" usage conditions and how that compares to an HFS+ formatted volume under the exact same conditions. To do this, I had to set up a simulation that would produce identical changes on two volumes to allow for a consistent, objective analysis of the filesystem performance. When I refer to "filesystem performance," I'm specifically referring to how long it takes the filesystem to do transactional tasks. Read and write performance depends almost entirely on the speed of the media, so I wanted to factor that out of my tests. Enumerating the contents of the filesystem is a good exercise of filesystem transactional performance, so I decided to test the enumeration of 1 million files on each an APFS and HFS+ filesystem over a period of simulated modifications to the filesystem.

The destination device in these tests is a 2TB Western Digital MyBook Duo split into two equal partitions. One partition is formatted HFS+, the other APFS. Spotlight was disabled on both volumes. Snapshot support and APFS defragmentation were varied in different tests to determine whether they had any effect on filesystem performance.

The number of files in the file set is constant – 1 million files, 111,000 directories (files nested three directories deep). To make the simulation closer to real-life, the file size distribution roughly follows 1/x2 – it’s weighted more heavily towards smaller files. Each individual file size is determined randomly, but in a pattern that follows that size distribution histogram. Average data set size is ~18GB. Max file size is 20GB... Read More

Mike's picture by Mike | March 30, 2018

On the eve of World Backup Day and with stories like the Atlanta ransomware attack still in the news, now is a great time to revisit your backup strategy. It's also a great time for us to announce some great new features that we're getting ready to deliver as a free update to CCC 5 users – features that will help you improve your defenses against ransomware and malware.

Versioned backups with APFS Snapshots

CCC 5.1 offers support for point-in-time restores by leveraging the snapshot feature of Apple's new APFS filesystem. CCC's SafetyNet feature offered similar functionality to this in the past, but snapshots take it to a new level, allowing you to do things like restore a previous version of the OS and older versions of your Photos library.

CCC is also the first comprehensive snapshot management utility for macOS. Browsing the contents of any snapshot is just a click away, and should you want to delete a specific snapshot (whether created by CCC or Time Machine), just select it and press the Delete key. How much space are those snapshots consuming? CCC can tell you that. No other utility offers this much insight into your APFS volumes' snapshots!

CCC 5.1 introduces comprehensive support for APFS snapshots

CCC 5.1 is currently available for beta testing. If you're the beta-software-testing type, check the "Inform me of beta updates" box in the Software Update section of CCC's Preferences window, then click the "Check for updates now" button if you would like to try it out.

Learn more about how you can add snapshot support to your backup strategy

Read-only snapshots offer great protection against ransomware

Snapshots are read-only copies of your volume. Not only is it impossible to modify the content of those snapshots, but it’s also not possible to delete those snapshots without a special entitlement granted by Apple. What that means is that malware and ransomware can't delete your snapshots. So if you were somehow affected by ransomware and it started encrypting your files, you could remove the ransomware, then restore your files from the snapshot. CCC backups could literally save you thousands of dollars!

What can I do to make sure my backup strategy is going to be effective?

I have four general tips: make backups to a locally-attached hard drive, keep it current, keep it encrypted, keep it unmounted.

Make backups to a locally-attached hard drive

NAS backups sound convenient and Cloud backup is the buzz, but when it comes down to actually using your... Read More

ccc

Mike's picture by Mike | August 18, 2017

I introduced CCC to the world over 15 years ago. With the debut of CCC 5 within reach, I thought it would be neat to see how CCC has changed over the years. I still remember the day that I published a description on VersionTracker and anticipated the response. Would people like it? Would someone else beat me to the solution? I've been thrilled with the response I've gotten from users over the years, and I'm happy to say that I've grown this little seed into a successful company that produces and supports a great product.

Conception: November, 2001

Before CCC, I wrote an AppleScript that performed the very basic tasks of copying files from one volume to another while retaining Unix permissions and ownership. The Mac OS X bootable backup was born! This little script never saw the light of day, though. Instead, I made the extra push to turn it into an application that would be accessible to more people.

CCC 1.0: January 18, 2002

This was the quintessential "1.0" release. All of the basic features were there for a simple clone from the startup disk to a backup disk.

CCC 2.0: November 2002

2.0 allowed you to choose any volume as the source. Look at those fancy buttons! And a scheduler! Documentation!

CCC 3.0: September 2007

The long gap between 2.0 and 3.0 was not a break. I spent those years diving deeper into the startup procedure of Mac OS X and I learned a lot. I wrote other applications too, including one that was used to clone hundreds of Macs all at the same time. I was also having kids :-). I remember bouncing my son in his baby bouncer while writing code at 3AM for CCC 3.0. It's amazing that I can look at sections of code and remember those moments so clearly, like a smell can remind you of a childhood memory.

CCC 3.4: July 2011

There were several dozen releases of CCC between 3.0 and 3.4, but this was the first big one after I left Apple.

CCC 4.0: October 2014

Not long after Lion was introduced I completely stripped CCC down and rebuilt it. The result was spectacular – a refreshing new task-centric interface and scheduling that felt built-in, not added as an afterthought.

... Read More

ccc

Mike's picture by Mike | March 8, 2016

Recently Palo Alto Networks reported a "ransomware" threat to Mac users named "KeRanger". After reading their analysis I found myself deeply concerned. Ransomware threats are nothing new, but I realized that this is probably the closest I've felt to the seedy world of cyber terrorism. Up until now all of that seemed to be aimed at governments, defense departments, big corporations... Windows users! Here we are, though, it's at our doorstep, and our neighbors are already victims. I received an email from a CCC customer yesterday that started with:

I happen to be one of the people who got hit with the ransomware hacks.

Yikes! I was not expecting a good outcome here. Thankfully, the rest of the email was:

Luckily I had a CCC of my drive and booted off that, deleted the ransomware files and was fine.

While this threat appears to be mostly contained at the moment, I think everybody should take some time to examine their defenses against this sort of attack. Having a backup is an obvious first step, but there are some additional steps that you can take to protect your backup too.

Protect yourself from ransomware

This particular ransomware attack is fairly clever. It lies dormant for a few days, then starts to encrypt your documents. It targets documents on externally-attached hard drives as well, and (in future developments) may even target Time Machine backups. CCC backups on external disks are vulnerable, as well. We have some suggestions that can help protect your backups from this sort of threat.

Keep your backup disk unmounted as much as possible

KeRanger targets volumes that are currently attached to your Mac and mounted. Physically detaching your backup disk from your Mac is the most effective way to protect that disk from attack, but it makes your backups more laborious, and you're less likely to keep them up to date. You can configure your CCC backup tasks to unmount the destination volume at the end of the backup task (click "Advanced settings" to reveal the option). With these settings, CCC will automatically mount the destination when the backup task is scheduled to run, then unmount the destination when the task is finished.

Encrypt your backup disk with FileVault

Keeping your backup disk unmounted is sufficient to protect you against the current KeRanger attack, but it may not protect your backup from future attacks. Finding attached-but-not-mounted devices isn't very difficult, nor is it difficult to mount those volumes once you've found them. If the cyberswine figure this out, you'll need an additional layer of protection. FileVault encryption will effectively prevent unauthorized applications from mounting your backup disk. Enabling FileVault... Read More