DEV Community

gxqwb
gxqwb

Posted on

SMR vs CMR Hard Drives: The Capacity Trick That Costs You Latency

A hard drive platter is a finite piece of glass, and the industry has been squeezing more bits onto it for decades. Conventional magnetic recording, or CMR, writes each track independently with a small guard gap between them. Shingled magnetic recording, or SMR, overlaps tracks like roof shingles so that one track's edge sits partly on top of its neighbour, reclaiming the guard gap and packing significantly more data into the same physical area. The catch is that you can no longer overwrite a single track in place without damaging the one next to it. That one mechanical fact explains almost every performance difference between the two.

SMR buys roughly 20 to 25 percent more capacity on the same platter by overlapping tracks, but that overlap forces read-modify-write sequences on random updates, so it trades sustained sequential throughput for unpredictable write latency.

Part One: What is being compared

To understand the trade, picture how a drive head writes. The write pole is physically wider than the read sensor. In a CMR drive, tracks are spaced far enough apart that the wide write field lands only on the intended track, leaving an empty gap that is wasted space but guarantees any track can be rewritten in isolation. This is the behaviour software has assumed since the beginning: a logical block address maps to a physical location, and writing to it changes only that location.

SMR removes the wasted gap. Tracks are written in overlapping bands, each new track partially covering the edge of the previously written one. This is only possible if writes happen sequentially, from the "bottom" of a band to the "top," because writing a new track overwrites part of the last one. Random access reads still work perfectly — the read sensor is narrow and can pick out an individual track. The problem is exclusively with writes: to update data in the middle of a band, the drive must read the whole affected region, rewrite it with your change, and write it all back.

Drive makers implemented this in two flavours. Device-managed SMR, sometimes called drive-managed, hides the complexity behind the drive's own firmware and a cache area; the host sees a normal block device and the drive quietly reshuffles data in the background. Host-managed SMR exposes the band structure to the operating system, which must write sequentially and reset zones itself, using the Zoned Block Device interface. Host-aware drives sit in between. The distinction matters because a device-managed drive can stall for seconds when its cache fills, while a host-managed drive makes the host responsible for avoiding the stall in the first place.

Part Two: The arithmetic

The capacity gain is the whole reason SMR exists. A modern 3.5-inch drive might hold 18 to 20 TB with CMR using nine or ten platters. Applying SMR to the same mechanical platform pushes that to 22 to 26 TB, and shingled writes are a major ingredient in the 30-plus TB drives shipping into hyperscale datacentres. At a rough bill of materials, the platters and head stack dominate cost, so extracting an extra 20 to 25 percent of capacity from the same spindle is close to free in manufacturing terms. That is a powerful incentive when storage is the largest line item in a cold-storage cluster.

A shingled drive typically yields about 20 to 25 percent more raw capacity from the same platters, but a random write inside a band can trigger a read-modify-write cycle that moves hundreds of kilobytes to rewrite a single 4 KB block.

The latency arithmetic is the other side. On a CMR drive, a random 4 KB write completes in roughly the time it takes to seek and rotate to the target sector — around 4 to 12 milliseconds on a 7200 RPM disk. On a device-managed SMR drive, if the target band's cache is cold, the drive reads the surrounding band into its cache, merges your block, then writes the band back sequentially. That can take tens to hundreds of milliseconds. Under sustained random write load, the cache saturates and the drive may pause host writes entirely to perform internal housekeeping, producing latency spikes of several seconds. The drive's average throughput figure can look fine while its tail latency is catastrophic.

For sequential workloads the arithmetic reverses in SMR's favour. Writing a large video file or a backup stream is exactly the access pattern shingling wants: one pass, head moving inward track by track, no read-modify-write at all. The drive sustains its full interface rate, sometimes 250 to 280 MB/s across the platter, and the higher areal density means more megabytes per second pass under the head. An archive that writes once and reads occasionally is close to the ideal SMR customer.

Part Three: Where the model breaks

The clean "archives good, databases bad" story gets messy in practice. Filesystems are not naturally sequential. A journaling filesystem constantly writes metadata in small scattered updates, and those metadata writes land in shingled bands even when the file data is a clean sequential stream. This is why early SMR drives paired with ordinary filesystems produced famously bad behaviour: a large copy would fill the cache, then the drive would stall for minutes while it reorganised bands, and applications would time out.

Device-managed SMR tries to hide this with a persistent cache and background band compaction, and modern drives are much better than the first generation. But hiding the cost is not the same as eliminating it. The drive is still doing the same read-modify-write work, just at a moment of its choosing. When the background compaction cannot keep up with incoming writes, the stall reappears. Monitoring tools often cannot see it, because the drive reports itself as a normal SCSI or ATA disk and gives no indication that a housekeeping pause is coming.

Host-managed SMR pushes the problem up the stack. Zoned storage requires a filesystem designed for it — such as btrfs with zoned mode, or f2fs with zoned block support — or an application that appends sequentially and resets zones explicitly, as object stores and log-structured systems can. That software support exists and is improving, but it is not universal. Plugging a host-managed drive into a system that assumes conventional random writes simply does not work; the drive will reject out-of-order writes rather than quietly fix them.

There is also a workload gradient rather than a hard boundary. A drive that serves a cold archive and is rewritten once a month behaves beautifully. The same drive used as a scratch space for a build server, with constant small rewrites, behaves terribly. The hardware is identical. Only the write pattern changed, which is why SMR cannot be judged by capacity or by sequential throughput alone.

What is actually transferable

The SMR versus CMR story is really a lesson about interfaces that hide their costs. CMR presents a simple abstraction — a block address you can overwrite at will — and charges a uniform, predictable price for it. SMR keeps the same outward abstraction in device-managed form but underneath it has a variable-cost operation that only appears under certain access patterns. The abstraction stays clean; the cost does not. This pattern recurs everywhere in storage, from flash translation layers to cloud object stores with eventual consistency.

For a home user, the practical consequence is mundane but real. If you buy a big external drive for Time Machine or a media library that mostly grows and is rarely rewritten, a shingled drive gives you more terabytes per dollar and you will likely never notice. If you try to run a virtual machine image, a database, or a torrent client that rewrites small pieces of a large file on that same drive, you can see the system freeze for seconds at a time. The same box, the same capacity, wildly different experience — determined entirely by whether the writes are sequential.

For a datacentre operator, the choice is an economic calculation. A cold-storage tier of SMR drives can cut the cost per terabyte enough to matter at petabyte scale, provided the workload is append-mostly and the software stack is zoned-aware. Object storage engines and backup targets fit this well. General-purpose database volumes do not. Many operators simply keep both tiers: shingled drives for the write-once cold layer and conventional drives for anything that sees random writes.

A fair comparison fixes the capacity, the interface, and the access pattern, then compares cost per terabyte and tail latency under the same workload. Comparing headline capacity is comparing one number in two very different ledgers.

Market sizing check

The global hard disk drive market ships on the order of 300 to 400 million units a year, with a large and growing share going into datacentres rather than PCs. If SMR continues to take maybe a third of nearline shipments as capacity pressure grows, that is on the order of 30 to 50 million drives a year carrying shingled recording, representing tens of billions of dollars of annual revenue at enterprise drive prices. The swing factor is whether zoned-storage software support becomes ubiquitous enough that the capacity advantage can be used without the latency tax.

These are order-of-magnitude estimates from published shipment ranges and a stated set of assumptions, not a forecast for any specific vendor.

The comparison that matters

The choice between SMR and CMR is not about which recording technology is better. CMR gives you predictable random-write latency at a lower capacity ceiling. SMR gives you more bits on the platter at the price of making writes a carefully managed resource. Neither is strictly superior; they are optimised for different shapes of workload.

The conclusion assumes you know your write pattern. If your data is written once and read many times, shingling is close to free capacity. If it is rewritten constantly in small pieces, the hidden read-modify-write cost dominates everything else. Know the workload before you buy the drive.

Shingled recording is not a slower disk — it is a disk that charges you for randomness, so the right question is not how fast the drive is but how sequential your writes are.

Creating this takes real effort — thank you for the support.
HCqPmPJM3NVtS6YrmVaTZYnuP8XZ2PFgQZKT94VK1LkS

Top comments (0)