← Back to context

Comment by etaioinshrdlu

4 years ago

As a laptop user I would probably opt to make the same choice as Apple here. I like the idea mentioned to allow a tunable parameter to only allow ever losing 1 second of data.

Although, I also have the seemingly rare opinion here that ECC ram doesn't really matter on a laptop or desktop.

It's not only losing a couple seconds of data. Write ordering does not work, meaning journals don't. You get a possibility of silent data corruption.

  • But apple could quite easily fix write ordering

    • NVME even allows to make queues write through, so e.g. the kernel/fs driver could have/access the drive via a safe queue that always gets written. You can also prioritize queues to lower the chances of important data to be lost, though Apple seems to be super aggressive on caching and the drives tend to keep some written data in cache for quite long intervals.

> only allow ever losing 1 second of data

For a database this means that every transaction will take a minimum of 1 second, otherwise you can't guarantee durability.

You think it's oke that restarting your PC leads to data loss or corruption? That's basically a product killer for me. I reboot my laptop everyday.

  • You presumably don't reboot your laptop by connecting a USB-PD gadget that issues a hard reset. A normal OS reboot is fine, that will flush the cache.

    The most common situation where this would affect laptops, in my experience so far, would be a broken driver causing a kernel lockup (not a panic) which triggers a watchdog reboot. That situation wouldn't allow for an NVMe flush.

    • For products like the Mac Mini, which don’t have a battery, does this mean that a loss of mains power will cause data loss? Because brownouts do happen occasionally…

      1 reply →

  • 1) A normal restart doesn't have this issue, at all.

    2) Why are you rebooting a laptop daily? My uptime on my MacBook Pro averages 30-60 days. There's zero reason to reboot any modern OS daily.

    • > There's zero reason to reboot any modern OS daily.

      - I use Arch, I like to avoid accumulating too much major updates between reboots. - For a time I was facing a bug that resulted in a black screen of death after resuming sleep.