MHN
Add a comment on Hacker News →
44 comments
  1. I want to like SMR disks, but WD pushing SMR disks into product lines where it doesn't belong, and the disks not being host-aware makes actually using them a losing proposition. Not to mention that SMR disks often aren't actually cheaper than equivalent CMR disks, at least in the consumer channels (the opposite is almost certainly the case in B2B, but I don't care about that).

    If the disks were host-aware, Linux (and preferably ZFS) could handle host-aware SMR disks non-catastrophically, and SMR disks were part of a separate product line with prices and capacities that make some sort of sense when you compare with the CMR line, I'd be all over them as cold storage, or just treating them as (re)write-once-read-many drives.

    But it's clear WD and Seagate don't care about the consumers. They're just a rounding error in comparison to B2B sales, especially given the current times.

    1. I think the customer must be cloud-scale customers, not us. The tech just has too many sharp edges if you don't build specifically for it. I probably would go so far as to say never use SMR unless you know exactly what you're doing.

      Here's Dropbox describing how they built around SMR:

      https://dropbox.tech/infrastructure/extending-magic-pocket-i...

    2. WD is also foisting SMR on corporate / hyperscale buyers. We don't want it, either, to be clear. But they just aren't selling CMR anymore. They're seemingly relentlessly focused on dollars per byte capacity, which is not necessarily the same metric their customers actually care about.

  2. As a relatively unserious data hoarder with a ZFS NAS, SMR drives are unusable, and are famous for resilver times ranging from weeks to never (drive times out). I'm sure there are workloads where they make sense (maybe archiving huge binary blobs). A while back Dropbox was using mostly SMR drives, so maybe the firmware and software ecosystem available for enterprise use cases is more approachable than I thought. And with the AI-driven price explosion for storage, perhaps the total cost of ownership even with the software investment starts to make sense.

    1. SMR drives are the worst, even had issue resilvering a 2TB mirror.

      What's frustrating is even just a little info from the manufactures would be beneficial, like the size of a shingle so the computer could batch writes, or even if the drive is shingled!

      1. That's why libzbc exists. Host-aware and host-managed SMR give you the tools to optimize I/O around the batching needed. It doesn't change the fundamental outlook - you still have to organize writes in these huge blocks and do some math to figure out the best timing to commit cache to re-writes - but it's at least a tractable problem compared to chucking everything over the wall with device-managed SMR.

        In any case, I don't think hobbyists get to play with the non-disk-managed drives, and anyone with the money and the special disks is probably not using ZFS because it's a bit of an uphill battle to fit SMR to a copy-on-write filesystem.

        1. +1 SMR drives are really great if you pack your data into large enough groups so that you occupy exacly N SMR zones, and allocate your files to specific SMR zones that you then only rewrite atomically. The sibling comment is on point - it's pretty similar to how to work effectively with SSDs.

          The drive doesn't have enough information to do this itself, we need SMR aware filesystems.

          1. What we need is host-based SMR. SMR-aware filesystems exist (e.g. Zoned XFS, btrfs' zone mode, f2fs' zone mode).

        2. How come copy-on-write is not easier with SMR? Each SMR zone a.k.a. shingle or flash erase block is effectively a tiny tape drive. It is basically append only.

          Shouldn't this be especially useful with ZFS doing copy-on-write with linked lists as a reversed heap?

          EDIT: So apparently, ZFS ashift is capped at 16 and values along 28 would be necessary to cover entire 256MiB (octet) shingles. Bummer.

          EDIT2: The basic problem seems to stem from the exact same assumption that SQLite3 [1] makes: The sector write size for random write access is 512B or 4KiB, or whatever. With SMR and flash erase blocks, random write sector size and random read sector size are vastly different. Will take ages for filesystems to be updated to this new reality and then validated on real workloads.

          [1] https://www.sqlite.org/atomiccommit.html, section 2 Hardware Assumptions.

          1. It seems like posix_fadvise a.k.a. fcntl only has provisions for forward read ahead a.k.a. prefetching and random access. The latter disables prefetching to free up disk read operations and dram memory otherwise used for read ahead.

            With a reverse B-tree heap it may be fruitful to prefetch a back offset from the end of the file that ends with the top of the heap inclusive and then switch to random single reads for the sparser read access "down" the heap towards the beginning of the file.

            Then comes the question of write access. Flash storage seems to be able to write small read-sized sectors into the empty remainders of erase blocks. With SMR the question becomes, whether there is a third sector size like a single track layer where the next overlapping track can be written later. For erasing, the whole shingle needs to be replaced kind of like a flash erase block.

            Maybe OpenZFS ashift can be adjusted to single track sizes within a shingle. That would curb write amplification to the physical limitations. At 60 to 150 tracks that still requires ashift between roughly 22 and 20.5 which are both larger than 16. Seems like it is especially bad if there are no common divisors or other rounding problems.

            Maybe non-temporal writes and write coalescing like in CPUs become relevant now. Dan Luu seems to be right here. The read(2), write(2), and fsync(2) bedrock of Unix may be forced to be updated to CPU-like caches where barriers, write-backs, etc. are handled separately.

            Land of contrasts, even compared to usual engineering trade offs.

            1. Maybe Donald Knuth should keep the paper foldout on tape access patterns in TAOCP instead of removing it in the next revision as he mentioned in an interview somewhere. The problem domain seems to be resurfacing.

        3. There are very good deals currently on eBay for 14TB HM-SR drives! I just got quite a few - should be interesting to see how the current zone aware filesystems perform. XFS with an optane metadata device? Could be pretty okay!

        4. Handling SMRs well probably would require a custom replacement for SPA (block layer) component in ZFS, talking directly with DMU (object storage).

          Could also expose the drives as SCSI object storage devices

          1. While we are at it, let us also redesign the important application of NFS. The actual implementation of NFS seems to have, ummm..., impedance mismatches for a lot of people using it casually in university computer networks and SLURM clusters.

            If we take a new hard look at open(2), read(2), and write(2), then let us look at real-world use cases. (Yes, yes, distributed systems. But the demand for at least decent errors is real.)

      2. And all of that for a pretty paltry gain in capacity.

      3. [deleted]

      4. Uh, they do advertise zone size. At least, host-aware SMR. Yes, yes, host-unaware SMR is even more terrible.

    2. When SSDs appeared, many filesystems performed badly on them, or degraded them much more quickly than needed, because they were not SSD-aware. It took a while to fix the issues, add TRIM, etc.

      Sounds like ZFS has the same problem today, it's not aware of SMR, and it treats those drives as if they are regular hard-drives.

      1. Many of the drives present themselves as regular hard drives. File systems can't do much about that.

        1. Even if there is nothing in SMART (hard to believe), you could still offer the user a way to flag the disk as SMR. Just like you can flag the disk as using native 4K sectors.

    3. I read a nice write-up of Dropbox's use of SMR drives here:

      https://dropbox.tech/infrastructure/four-years-of-smr-storag...

    4. This is a bug/design flaw in ZFS, they work fine in md IME.

  3. I could only find an explanation of what it actually is here: https://documents.westerndigital.com/content/dam/doc-library...

    1. Thanks. Looks like SMR drives will get a bit more dense, but with the same limitations as before — no update in place without bunch of rewriting.

      Means they are still bad in RAID setups

      1. Host-Managed SMR is a good middle-ground, but the file system support is still poor.

        1. Exactly. I already use a CoW filesystem so SMR ought to be a non-issue but last I checked the software side of things wasn't ready yet.

      2. Hardware-RAID doesn't make sense for more than 10 years now.

        1. Software RAID has the same problem, no?

      3. They're still bad in ZFS too, because of resilvering challenges.

    2. Which also makes it super clear that the intended use case is customers willing to use SMR-aware software to get a generation or two of density-per-bay improvement, not folks trying to jam it into current workflows.

    3. The linked "blog" article has some LLM tells - the punchy elevator-pitch style; and there's no human author credited: it's attributed to their guest author "WD" - and it's all just fluff-pieces, ugh: https://blog.westerndigital.com/?guest_author=wd

      ...why does anyone in WD's corporate communications team think this is a good idea? Data storage is important and as a potential-customer I need to be able to trust my HDD OEMs - but fake blogs like these just erode trust.

  4. THE issue with SMR is that they use designated area on the disk on the same head as disk as staging area.

    They do like "ls /sda0/dirty-tracks/ | xargs -P 1 dd if=/sda0/dirty-tracks/{} of=/dev/sda{} size=512M && rm /sda0/{}", but onboard the disk, not on the host, and that's both wildly slow and imcompatible with anything but super light or niche use cases.

    If only they at least used a NAND flash for that staging or at least coordinated with the host system, but no, HDD industry chose not to cooperate with anyone and to hide the fact that some disks are DM-SMRs.

    1. These "UltraSMR" don't work that way.

  5. More capacity density, if you completely ignore IO density. But many HDD workloads were already IO bound, and SMR is much, much worse. (HDD vendors won't sell CMR to hyperscalers anymore -- it's like they are trying to get us to buy QLC flash instead of their products.)

    Think of SMR as "fast tape with random reads" rather than anything like a CMR product.

  6. I think the future of hard drives involves absolutely huge error correction block sizes - 1 gigabyte or more.

    The way it would work is:

    • The underlying disk would do sequential writes only, in 1Gb blocks, rather like a log filesystem.
    • The large block size enables much better information density due to being able to tolerate far more errors.
    • Random reads within blocks can usually be done - but occasionally most or all of the whole block will need to be read to decode the data.
    • A small capacitor+disk momentum ensures any writes that happened before a power failure can always be completed - either to the real disk or to flash.
    • The OS still only sees 4k pages - versioning, packing those into 1Gb blocks, mappings and garbage collection are all handled inside the drive.
    1. 1GB error correction block sizes in HDDs won't happen due to the latency constraint. It would take multiple seconds to apply an error correction code on a 1GB block on an HDD. Nobody would be willing to accept that. Ergo, block sizes will remain modest (4KB to a few hundred KB). Doing partial reads inside a zone is a non-issue, so there's no need to force error correction happen onto huge block sizes.

      If you're talking about larger data zones, that is already happening. It just happens to be that zone support in storage is uninteresting to 99% of users as the products that require it generally have garbage performance for use cases other than tape replacement. Given the extremely narrow niche, very few filesystem developers have any reason to work on support for zoned block devices. The end result is that it will always be a poorly supported feature with accompanying the glass jaws that come with earlier forms of SMR.

      What WD is really announcing here is more like translation layers that have existed inside of modern SSDs for more than a decade. Earlier generations of SMR re-wrote entire zones to keep logical sectors laid out in linear form on the physical device, so building a more advanced translation layer will improve performance by orders of magnitude for many workloads. That said, the performance will still remain entirely awful for the vast majority of workloads outside of the tape replacement niche.

    2. Most enterprise storage arrays have writes going to some kind of very fast NVRAM and batched so that data can be written to storage in larger blocks.

    3. > any writes that happened before a power failure can always be completed

      It can be also the data milliseconds after loosing power. The minimal amount of data in question is the data that the drive has acknowledged to the OS after a special command.

      Anyway, this problem is already solved at least few years ago.

  7. Has Western Digital found yet another way to further degrade the performance of their drives beyond their initial deployment of OptiNAND and SMR? At this rate the tail latency of a tape robot is going to outperform WD spinning rust.

    1. > OptiNAND

      While I doubt this increases the reliability, I'd rather fear, it decreases it. But I'd expect it should indeed increase a little bit performance, since drive metadata can be accessed instantly from NAND instead from platters.

  8. SMR is honestly just an "avoid at all costs" technology, abysmal performance in any application.

    1. I haven't had an opportunity to use them, and thankfully managed to avoid device managed CMR disks... But I suspect there's some applications where the increased storage density works out.

      Most likely very little writes and either light reads or very sequential reads.

      I would think it would make sense for the origin servers for a big video distribution platform with a CDN. The CDN is likely to cache most of the requests so origin servers have a low request rate and increasing storage density will material reduce capital costs, because you can only put so many disks in the machines.

      It probably works in archival/backup systems which tend to be write once, read never. Ingest inputs onto ssd, then write whole shingles to disk at once. Typically don't touch the data again until it's expired and you can overwrite it.

      1. > device managed CMR disks

        You mean SMR.

        > or very sequential reads.

        I haven't heard SMR would show worse random read performance than CMR.

    2. For some applications it works fine, but not for ZFS! Like really there are many systems (like ZFS!) that organize I/O the way SMR does to reduce seek overhead for writes. Some applications on some file systems will be faster or Smarter than CMR so they had data to justify you could use it as a drop-in replacement and you could with ext4 or ntfs but not ZFS.

  9. It’s 10x more soothing than standard ASMR