Following my deep dive into controlling the performance of Apple Archive compression and decompression, I’m delighted to announce version 1.4 of my little utility Cormorant, which now gives you total control over how fast and how economical these are. If you want fast and efficient compression on an M1 series Mac in particular, this is for you.
Cormorant started life with two main aims: it was an experiment using the example code supplied by Apple, giving access to Big Sur’s new Apple Archive feature. It’s also intended to be of particular use in conjunction with file exchange using AirDrop and similar, which has that nasty habit of adding a quarantine flag to everything you transfer.
Few if any other compression utilities seem to have recognised the high performance delivered by Apple Archive, so Cormorant is steadily growing into an even more capable utility which you can use for archiving files and folders which are only going to be used on Macs. Most recently, I added a slider to let you set the Quality of Service, to determine which cores are used on M1 chips.
That has blossomed into two separate controls, which now give you complete control over speed and energy used for each compression and decompression it performs. These offer presets on the left, and custom controls on the right.
There are three presets, from the left:
- 🐢 (green turtle) slowest with best economy, runs entirely on the E cores of M1 chips;
- 🚙 (blue pickup) good performance but not so economical, runs 4 threads on the first cluster of four P cores of M1 chips;
- 🏎 (red racing car) fastest, and who cares how much power it uses? Runs on all the cores, P and E, of M1 chips.
The setting at the right 👉 (yellow hand pointing) enables the custom controls at the right.
When compressing large files of more than 5 GB, you can expect the following performance on M1 Pro and Max chips (given as compression decompression):
- 🐢 200 MB/s 1.3 GB/s
- 🚙 770 MB/s 5.2 GB/s
- 🏎 1.7 GB/s 5.3 GB/s
Performance is likely to be slightly slower on Macs with the original M1 chip, and potentially much faster (for 🐢 and 🏎) on M1 Ultra chips. You should get what you paid for!
The following energy consumption, in Joules per GB of file processed, is expected on M1 Pro and Max chips (compression/decompression):
- 🐢 3/0.5
- 🚙 12/2
- 🏎 12/4
When the left slider is set to 👉 manual, you set the number of threads and Quality of Service used by Apple Archive in the controls on the right.
In the Threads box, enter an integer between 0 and 99. Zero 0 lets Apple Archive use as many cores as it can, with one thread per core. Integers from 1-99 set the number of threads; if those exceed the number of available cores, then multiple threads will be run on the cores.
The four slider positions correspond to the following Quality of Service values, from Friendly to Fast:
- background (9)
- utility (17)
- userInitiated (25)
- userInteractive (33).
The background setting confines Apple Archive threads to E cores in M1 chips; all other settings allow the threads to be run on either P or E cores. In that case, they are normally loaded onto P cores first. In an M1 Pro chip with 8 P cores and 2 E cores, that usually means that 1-8 threads will be run only on the P cores, and 9 and above will also include the E cores.
I hope that gives you the best of both worlds, with simple choice of presets and total control using custom settings.
Because Cormorant uses Apple Archive, special files in APFS are preserved in its compressed archives. To give an artificial example of how effective this can be, I created a folder containing five clones of a 1 GB original file, and a sparse file whose fully expanded size would be 5 GB. Cormorant compressed that folder into an archive of just 7.4 MB (that’s not a typo, it really was 7.4 MB). Unfortunately, when that’s decompressed it explodes to its full 10 GB size, but it was impressive while it lasted.