Most active commenters
  • GeekyBear(9)
  • throw0101c(6)
  • protimewaster(4)
  • dylan604(4)
  • jeffbee(3)
  • daneel_w(3)

←back to thread

420 points speckx | 58 comments | | HN request time: 1.619s | source | bottom
1. GeekyBear ◴[] No.44533662[source]
The article speculates on why Apple integrates the SSD controller onto the SOC for their A and M series chips, but misses one big reason, data integrity.

About a decade and a half ago, Apple paid half a billion dollars to acquire the patents of a company making enterprise SSD controllers.

> Anobit appears to be applying a lot of signal processing techniques in addition to ECC to address the issue of NAND reliability and data retention. In its patents there are mentions of periodically refreshing cells whose voltages may have drifted, exploiting some of the behaviors of adjacent cells and generally trying to deal with the things that happen to NAND once it's been worn considerably.

Through all of these efforts, Anobit is promising significant improvements in NAND longevity and reliability.

https://www.anandtech.com/show/5258/apple-acquires-anobit-br...

replies(6): >>44533738 #>>44533751 #>>44533915 #>>44534949 #>>44535290 #>>44538521 #
2. jeffbee ◴[] No.44533738[source]
> Through all of these efforts, Anobit is promising significant improvements in NAND longevity and reliability.

Every flash controller does this. Modern NAND is just math on a stick. Lots and lots of math.

replies(1): >>44533804 #
3. wpm ◴[] No.44533751[source]
Note that this isn't too long after Apple abandoned efforts to bring ZFS into Mac OS X as a potential default filesystem. Patents were probably a good reason, given the Oracle buyout of Sun, but also a bit of "skating to where the puck will be" and realizing that the spinning rust ZFS was built for probably wasn't going to be in their computers for much longer.
replies(3): >>44533875 #>>44533957 #>>44534041 #
4. dontlaugh ◴[] No.44533804[source]
Presumably Apple want to be able to guarantee the quality of such logic.

Still sucks that you can’t use standard parts.

replies(2): >>44533956 #>>44534022 #
5. GeekyBear ◴[] No.44533875[source]
When Apple announced the creation of APFS they mentioned that their intent was to handle data integrity at the hardware level.
replies(1): >>44534173 #
6. throw0101c ◴[] No.44533915[source]
> The article speculates on why Apple integrates the SSD controller onto the SOC for their A and M series chips, but misses one big reason, data integrity.

If they're really interested with data integrity they should add checksums to APFS.

If you don't have RAID you can't rebuild corrupted data, but at least you know there's a problem and perhaps restore from Time Machine.

For metadata, you may have multiple copies, so can use a known-good one (this is how ZFS works: some things have multiple copies 'inherently' because they're so important).

Edit:

> Apple File System uses checksums to ensure data integrity for metadata but not for the actual user data, relying instead on error-correcting code (ECC) mechanisms in the storage hardware.[18]

* https://en.wikipedia.org/wiki/Apple_File_System#Data_integri...

replies(4): >>44534176 #>>44535853 #>>44535923 #>>44540350 #
7. jeffbee ◴[] No.44533956{3}[source]
Sure, and I agree with that goal. In fact I would like NVMe controllers to simply not exist. The operating system should manage raw flash, using host algorithms that I can study in the the source code.
replies(3): >>44534134 #>>44534146 #>>44543100 #
8. kjkjadksj ◴[] No.44533957[source]
More evidence they thought hdds were on their way out was the unibody macbook keynote. They made a big deal about how the user can access their hdd from the latch on the bottom without any tools as they said ssd was on the horizon.
9. daneel_w ◴[] No.44534022{3}[source]
Contrary to popular belief, you can run many different off-the-shelf brand NVMe drives on all of the NVMe-fitted Intel Macs. All you need is a passive adapter. My 2017 MacBook Air has a 250GB WD Blue SN570 in it.

https://forums.macrumors.com/threads/upgrading-2013-2015-mac...

replies(2): >>44537081 #>>44539625 #
10. throw0101c ◴[] No.44534041[source]
> Patents were probably a good reason, given the Oracle buyout of Sun

There is no reason to speculate as the reason is know (as stated by Jeff Bonwick, one of the co-inventors of ZFS):

>> Apple can currently just take the ZFS CDDL code and incorporate it (like they did with DTrace), but it may be that they wanted a "private license" from Sun (with appropriate technical support and indemnification), and the two entities couldn't come to mutually agreeable terms.

> I cannot disclose details, but that is the essence of it.

* https://archive.is/http://mail.opensolaris.org/pipermail/zfs...

* https://web.archive.org/web/*/http://mail.opensolaris.org/pi...

replies(1): >>44536025 #
11. nine_k ◴[] No.44534134{4}[source]
How do you think it would be electrically connected to the CPU?

Same thing with DDR5: the electrical layer is a beast, it's a reason enough to require its own controller.

replies(1): >>44534262 #
12. gruturo ◴[] No.44534146{4}[source]
I'm with you, but.... no. At the level where the controller is operating, things are no longer digital. Capacity (as in farads, not bytes), voltage, crosstalk, debouncing, traces behaving like antennas, terminations, what have you. Analog values, temperature dependencies, RF interference. Stuff best dealt with custom logic placed as close as possible to it.
replies(1): >>44535438 #
13. throw0101c ◴[] No.44534173{3}[source]
See:

> Apple File System uses checksums to ensure data integrity for metadata but not for the actual user data, relying instead on error-correcting code (ECC) mechanisms in the storage hardware.[18]

* https://en.wikipedia.org/wiki/Apple_File_System#Data_integri...

14. GeekyBear ◴[] No.44534176[source]
> If they're really interested with data integrity they should add checksums to APFS.

Or you can spend half a billion dollars to solve the issue in hardware.

As one of the creators of ZFS wrote when APFS was announced:

> Explicitly not checksumming user data is a little more interesting. The APFS engineers I talked to cited strong ECC protection within Apple storage devices. Both NAND flash SSDs and magnetic media HDDs use redundant data to detect and correct errors. The Apple engineers contend that Apple devices basically don't return bogus data.

https://arstechnica.com/gadgets/2016/06/a-zfs-developers-ana...

APFS keeps redundant copies and checksums for metadata, but doesn't constantly checksum files looking for changes any more than NTFS does.

replies(3): >>44534268 #>>44534374 #>>44534779 #
15. daneel_w ◴[] No.44534262{5}[source]
> How do you think it would be electrically connected to the CPU?

On the CPU's PCIe bus. NVMe drives are PCIe devices, designed specifically to facilitate such interfacing.

Edit: Pardon, misread the actual statement you responded to. Of course one shouldn't hook NAND directly to the CPU. I'll leave my response for whatever value the info has.

16. sitkack ◴[] No.44534268{3}[source]
That is a weak excuse to rely on data integrity in the hardware. They most likely had that feature and removed it so they wouldn't be liable for a class action lawsuit when it turns out the NAND ages out due to bug in the retention algorithm. NTFS is what, 35 years old at this point? Odd comparison.
replies(1): >>44534424 #
17. protimewaster ◴[] No.44534374{3}[source]
That solution doesn't help anyone who's using external storage, though, so it kinda feels like a half billion dollars spent on a limited solution.
replies(4): >>44534607 #>>44535017 #>>44535664 #>>44541855 #
18. GeekyBear ◴[] No.44534424{4}[source]
The point is that NTFS makes zero effort to maintain file integrity at any level.

Handling file integrity at the hardware level is a big step up.

replies(1): >>44545364 #
19. GeekyBear ◴[] No.44534607{4}[source]
There is nothing preventing you from running OpenZFS on external storage if you are worried that the hardware you purchased is less reliable.
replies(2): >>44534859 #>>44537901 #
20. throw0101c ◴[] No.44534779{3}[source]
> Or you can spend half a billion dollars to solve the issue in hardware.

And hope that your hardware/firmware doesn't ever get bugs.

Or you can do checksumming at the hardware layer and checksumming at the software/FS layer. Protection in depth.

ZFS has caught issues from hardware, like when LBA 123 is requested but LBA 456 is delivered: the hardware-level checksum for LBA 456 was fine, and so it was passed up the stack, but it wasn't actually the data that was asked for. See Bryan Cantrill's talk "Zebras All the way Down":

* https://www.youtube.com/watch?v=fE2KDzZaxvE

And if checksums are not needed for a particular use-case, make them toggleable: even ZFS has a set checksums=off option. My problem is not having the option at all.

replies(1): >>44534941 #
21. protimewaster ◴[] No.44534859{5}[source]
That's my point, though, is that it seems weird to spend a half billion dollars just to solve the problem for an extremely common use case by saying "use OpenZFS".

Why not come up with a solution that covers external storage too, instead of spending all that money and relying on external solutions? I just don't understand why they couldn't have optional checksums in APFS.

replies(1): >>44535056 #
22. GeekyBear ◴[] No.44534941{4}[source]
When the vast majority of the devices you sell run on battery power, it makes far more sense from a battery life perspective to handle issues in hardware as much as possible.

For instance, try to find a processor aimed at mobile devices that doesn't handle video decoding in dedicated hardware instead of running it on a CPU core.

replies(2): >>44535496 #>>44537418 #
23. vlovich123 ◴[] No.44534949[source]
Not just durability. Performance too. Apple has a much better SSD controller that is vertically integrated into the stack.
24. slt2021 ◴[] No.44535017{4}[source]
maybe apple doesn't want you to use external storage, because storage size is how apple upsells devices and grabs larger premium.

By using external storage, instead of paying $10k more for more storage, you are directly harming Apple’s margins and the CEO’s bonus which is not ok /s

replies(1): >>44535999 #
25. GeekyBear ◴[] No.44535056{6}[source]
It's far more weird that NTFS still makes zero effort to maintain file integrity on any level, on internal or external disks.

ReFS exists, so Microsoft knew they needed to do something, but they have utterly failed to protect the vast majority of users.

replies(1): >>44536073 #
26. pkaye ◴[] No.44535290[source]
Do Apple SSDs have a much longer longevity and reliability? I've not looked at the specific patents nor am I an expert on signal processing but I've worked on SSD controllers and NAND manufacturers in the past and they had their own similar ideas as this.
replies(1): >>44535886 #
27. jeffbee ◴[] No.44535438{5}[source]
The physical interface controller can exist to that extent, of course. But I think the command interface it should present to the host system should be a physical one, not a logical translation. The host should be totally aware of the layout of the flash devices, and should command the things that the devices are actually capable of doing: erase this, write that, read this.

We already see the demand for this in the latest NVMe protocol spec that allows the host to give placement hints. But this is a half-measure that suggests what systems really want, which is not to vaguely influence the device but instead to tell it exactly what to do.

28. flkenosad ◴[] No.44535496{5}[source]
Good point.
29. creddit ◴[] No.44535664{4}[source]
No one requires you to use APFS for your external storage!
replies(1): >>44535749 #
30. amethyst ◴[] No.44535749{5}[source]
And yet it's the default when formatting a device on macOS.
replies(1): >>44535985 #
31. bell-cot ◴[] No.44535853[source]
Worth noting, for ZFS - you can use the "copies" property of the dataset to save 2 or (usually) 3 separate copies of your data to the drive(s).
32. fckgw ◴[] No.44535886[source]
From my experience working on Mac laptops, yeah. SSD failures are incredibly rare but on the flip side when they do go out repairs are very costly.

I know if my previous job at a large hard drive manufacturer we had special Apple drives that ran different parts and firmware than the regular PC drives. Their specs and tolerances where much different than the PC market at a whole.

33. brookst ◴[] No.44535923[source]
Believing that giant companies are monolithic “theys” leads to all sorts of fallacies.

Odds are very good that totally different people work on the architecture of AFS and SoC design.

replies(1): >>44536011 #
34. dylan604 ◴[] No.44535985{6}[source]
Being afraid to not use the default is evidence of not being a power user!
replies(2): >>44539806 #>>44540679 #
35. dylan604 ◴[] No.44535999{5}[source]
Externally connected devices are not sexy, and Apple is concerned about image and looking sexy.
36. dylan604 ◴[] No.44536011{3}[source]
Even still, those people report to people that report to people until you eventually get to the person in charge of the full product.
37. dylan604 ◴[] No.44536025{3}[source]
How is it known when the quote you gave says "may be" which implies it's not known and is speculation on their part as well?
replies(2): >>44536312 #>>44537354 #
38. protimewaster ◴[] No.44536073{7}[source]
To be fair, though, NTFS predates APFS by over 20 years.

Don't get me wrong, there's no reason Microsoft can't transition to another filesystem (like offering ReFS outside of Server or whatever Windows variants support it currently), but I don't understand why a company would transition to a new filesystem in 2016 and not include a data checksums option. Hell, ReFS predates APFS, and I think it even has optional data checksums.

replies(2): >>44536728 #>>44537220 #
39. duskwuff ◴[] No.44536312{4}[source]
The reply to the "it may be..." message is from a @sun.com email address, and confirms "that is the essence of it".

Fixed links for the message and reply:

https://web.archive.org/web/20091028/http://mail.opensolaris...

https://web.archive.org/web/20091028/http://mail.opensolaris...

40. GeekyBear ◴[] No.44536728{8}[source]
To be fair, NTFS is still the default Windows 11 filesystem in 2025, and Microsoft still makes zero effort to insure file integrity when you use that default Windows filesystem.

Handling file integrity in hardware is a big step up.

replies(1): >>44537155 #
41. riobard ◴[] No.44537081{4}[source]
Not all Intel Macs. Only those without T2 chip, as T2 acts as the storage controller.
42. protimewaster ◴[] No.44537155{9}[source]
> Handling file integrity in hardware is a big step up.

Is there any evidence that Apple actually has better hardware data integrity than anyone else, though? They make claims in the article linked a few posts back, but AFAIK SSDs in general make use of error correcting codes, not just Apple's SSDs.

That article also points out how even multi-million dollar arrays are known to return bad data, and previous Apple SSD devices have been known to do the same.

I agree that the state of default filesystems is bad, but I'm not convinced that Apple's hardware solution is anything more than them saying, "Trust me, bro."

43. p_ing ◴[] No.44537220{8}[source]
ReFS is available on Windows 10/11 client; it's what the DevDrive feature uses. And the current Insider allows installation of the OS/boot volume on ReFS.

https://forums.guru3d.com/threads/testing-instaling-windows-...

44. throw0101c ◴[] No.44537354{4}[source]
"I cannot disclose details, but that is the essence of it." — Jeff Bonwick of Sun, co-inventor of ZFS
45. throw0101c ◴[] No.44537418{5}[source]
> […] handle issues in hardware as much as possible.

1. There is hardware support for (e.g.) SHA in ARM:

* https://developer.arm.com/documentation/ddi0514/g/introducti...

But given Apple designs their own CPUs they could add extensions for anything they need. Or use a simpler algorithm, like Fletcher (which ZFS uses):

* https://en.wikipedia.org/wiki/Fletcher%27s_checksum

2. It does not have to be enabled by default for every device. The main problem is the lack of it even as an option.

I wouldn't necessarily use ZFS checksums on a laptop, but ZFS has them for when I use it on a not-laptop.

replies(1): >>44538275 #
46. whartung ◴[] No.44537901{5}[source]
Every time I tried OpenZFS on my iMac, it absolutely crushed the performance of the entire machine.

We’re talking “watch the mouse crawl across the machine” crushed. Completely useless. Life returned to normal when I uninstalled it.

Also, I’ve heard anecdotes that ZFS and USB do not get along.

I’ve also heard contrary experiences. Some folks, somewhere, may be having success with ZFS on external drives on an iMac.

I’m just not one of them.

47. GeekyBear ◴[] No.44538275{6}[source]
> given Apple designs their own CPUs they could add extensions for anything they need.

Indeed. They added an entire enterprise grade SSD controller.

> In its patents there are mentions of periodically refreshing cells whose voltages may have drifted, exploiting some of the behaviors of adjacent cells and generally trying to deal with the things that happen to NAND once it's been worn considerably.

48. rasz ◴[] No.44538521[source]
Main reason was capturing 100% of storage upsell/upgrade money. They did same thing with RAM.
49. Rohansi ◴[] No.44539625{4}[source]
And all of the Apple Silicon Macs have them soldered on or use a proprietary module. They make way too much from storage upgrades to include an M.2 slot.
replies(1): >>44543328 #
50. pjmlp ◴[] No.44539806{7}[source]
Occasionally that is mistaken by newbies as such, oftentimes it is the voice of experience and battlefield scars driving sensible decisions.
51. sneak ◴[] No.44540350[source]
You can do this yourself in userspace if you really want it:

https://git.eeqj.de/sneak/attrsum

I use zfs where I can (it has content checksums) but it sucks bad on macOS, so I wrote attrsum. It keeps the file content checksum in an xattr (which APFS (and ext3/4) supports).

I use it to protect my photo library on a huge external SSD formatted with APFS (encrypted, natch) because I need to mount it on a mac laptop for Lightroom.

replies(1): >>44541687 #
52. avhception ◴[] No.44540679{7}[source]
Default or not, are there sensible alternatives on a Mac? I'm not sure if I'd consider OpenZFS on Mac "sensible" - but I haven't owned a Mac in decades, so... what are the alternatives to APFS?
53. arm ◴[] No.44541687{3}[source]
A similar alternative is Howard Oakley’s Dintch/Fintch/cintch:

https://eclecticlight.co/dintch/

54. 1over137 ◴[] No.44541855{4}[source]
Apple does not care about external storage at all, as in external disks. They offer iCloud for external storage. They don't sell external disks. They don't like cables. They make lots of money selling you a bigger internal disk.
replies(1): >>44543014 #
55. realityking ◴[] No.44543014{5}[source]
Their store has a whole section dedicated to storage, most of it external. https://www.apple.com/shop/mac/accessories/storage
56. mixmastamyk ◴[] No.44543100{4}[source]
Interesting… I see no reason to be downvoted.
57. daneel_w ◴[] No.44543328{5}[source]
The on-board storage of their MacBooks is as much, if not more, driven by their design vision. They didn't make these things record thin to get an excuse to use surface-mounted RAM and storage. I don't agree with it, but I understand it.
58. sitkack ◴[] No.44545364{5}[source]
NTFS is an ancient but well designed file system, a more apt comparison would be ZFS or BTRFS both of which checksum metadata and data.