Exploring the NVMe Host Memory Buffer Feature

Most modern SSDs include onboard DRAM, typically in a ratio of 1GB RAM per 1TB of NAND flash memory. This RAM is usually dedicated to tracking where each logical block address is physically stored on the NAND flash—information that changes with every write operation due to the wear leveling that flash memory requires. This information must also be consulted in order to complete any read operation. The standard DRAM to NAND ratio provides enough RAM for the SSD controller to use a simple and fast lookup table instead of more complicated data structures. This greatly reduces the work the SSD controller needs to do to handle IO operations, and is key to offering consistent performance.

SSDs that omit this DRAM can be cheaper and smaller, but because they can only store their mapping tables in the flash memory instead of much faster DRAM, there's a substantial performance penalty. In the worst case, read latency is doubled as potentially every read request from the host first requires a NAND flash read to look up the logical to physical address mapping, then a second read to actually fetch the requested data.

The NVMe version 1.2 specification introduced an in-between option for SSDs. The Host Memory Buffer (HMB) feature takes advantage of the DMA capabilities of PCI Express to allow SSDs to use some of the DRAM attached to the CPU, instead of requiring the SSD to bring its own DRAM. Accessing host memory over PCIe is slower than accessing onboard DRAM, but still much faster than reading from flash. The HMB is not intended to be a full-sized replacement for the onboard DRAM that mainstream SSDs use. Instead, all SSDs using the HMB feature so far have targeted buffer sizes in the tens of megabytes. This is sufficient for the drive to cache mapping information for tens of gigabytes of flash, which is adequate for many consumer workloads. (Our ATSB Light test only touches 26GB of the drive, and only 8GB of the drive is accessed more than once.)

Caching is of course one of the most famously difficult problems in computer science and none of the SSD controller vendors are eager to share exactly how their HMB-enabled controllers and firmware use the host DRAM they are given, but it's safe to assume the caching strategies focus on retaining the most recently and heavily used mapping information. Areas of the drive that are accessed repeatedly will have read latencies similar to that of mainstream drives, while data that hasn't been touched in a while will be accessed with performance resembling that of traditional DRAMless SSDs.

SSD controllers do have some memory built in to the controller itself, but usually not enough to allow a significant portion of NAND mapping tables to be cached. For example, the Marvell 88SS1093 Eldora high-end NVMe SSD controller has numerous on-chip buffers with capacities in the kilobyte range and aggregate capacity of less than 1MB. Some SSD vendors have hinted that their controllers have significantly more on-board memory—Western Digital says this is why their SN520 NVMe SSD doesn't use HMB, but they declined to say how much memory is on that controller. We've also seen some other drives in recent years that don't fall clearly into the DRAMless category or the 1GB per TB ratio. The Toshiba OCZ VX500 uses a 256MB DRAM part for the 1TB model, but the smaller capacity drives rely just on the memory built in to the controller (and of course, Toshiba didn't disclose the details of that controller architecture).

The Toshiba RC100 requests a block of 38 MB of host DRAM from the operating system. The OS could provide more or less than the drive's preferred amount, and if the RC100 gets less than 10MB it will give up on trying to use HMB at all. Both the Linux and Windows NMVe drivers expose some settings for the HMB feature, allowing us to test the RC100 with HMB enabled and disabled. In theory, we could also test with varying amounts of host memory allocated to the SSD, but that would be a fairly time-consuming exercise and would not reflect any real-world use cases, because the driver settings in question are so obscure and not worth changing from their defaults.

Working Set Size

We can see the effects of the HMB cache quite clearly by measuring random read performance while increasing the test's working set—the amount of data that's actively being accessed. When all of the random reads are coming from the same 1GB range, the RC100 performs much better than when the random reads span the entire drive. There's a sharp drop in performance when the working set approaches 32GB. When the RC100 is tested with HMB off, performance is just as good for a 1GB working set (and actually substantially better on the 480GB model), but larger working sets are almost as slow as the full-span random reads. It looks like the RC100's controller may have about 1MB of built-in memory that is much faster than accessing host DRAM over the PCIe link.

Most mainstream SSDs offer nearly the same random read performance regardless of the working set size, though performance through this test varies some due to other factors (eg. thermal throttling). The drives using the Phison E7 and E8 NVMe controllers are a notable exception, with significant performance falloff as the working set grows, despite these drives being equipped with ample onboard DRAM.

Introduction AnandTech Storage Bench - The Destroyer


View All Comments

  • PeachNCream - Thursday, June 14, 2018 - link

    I care. I like seeing what's happening in the rest of the market outside of the highest end hardware since I am more likely to allocate less money to a computer than is required to get top performing parts. Why waste the money on something as unimportant as a computer component when there's a retirement account and a comfortable post-work life to enjoy as soon as humanly possible? Priorities kid, you've got to figure out what matters most in life. Protip: It's not computer parts. Reply
  • chrnochime - Thursday, June 14, 2018 - link

    You!= everyone. So don't ask such silly question as "did anyone care" because of course there are ppl out there that care. Reply
  • smilingcrow - Thursday, June 14, 2018 - link

    970 Pro is mainly for show-offs. If you actually need high end performance there are faster and more cost effective solutions. Reply
  • mr_tawan - Friday, June 15, 2018 - link

    It's probably down the pipe. And if it's not, then you can buy them a review unit. Reply
  • bananaforscale - Monday, July 9, 2018 - link

    Like it or not, low end sells much more than high. Not that a low-end NVMe drive is slow by typical standards. Reply
  • u.of.ipod - Thursday, June 14, 2018 - link

    Billy nice write-up, good to see something a little different. I've read some reviews and am wondering why NVMe is really taking off for lower end drives? From what I can tell even if you compare top of the line NVMe drives against your average SATA SSD, the real world differences are pretty slim for the majority of use cases. Why try to shove NVMe into the low-end market? Is SATA going away? Are many new M.2 slots not compatible with both SATA and NVMe?

    I've really only used SATA M.2 drives thus far and have been happy with the results.
  • MajGenRelativity - Thursday, June 14, 2018 - link

    I'm not sure why, but it could be about standardizing on NVMe. If everything supports NVMe, there don't need to be as many SATA ports, which saves companies some money Reply
  • Midwayman - Thursday, June 14, 2018 - link

    Halo effect and marketing? Is there really any reason a NVMe drive needs to be more expensive? So long as most computers are supporting it now you might as well standardize new drives on the newer interface. Reply
  • bug77 - Thursday, June 14, 2018 - link

    On top of that, NVMe comes with higher power draw. Because PCIe vs SATA. Reply
  • PeachNCream - Thursday, June 14, 2018 - link

    That can be fixed with technological development. For now, SATA is more power-efficient, but as NVMe becomes more popular, market forces will create a demand for higher efficiencies and the problem will be soon enough. Reply

Log in

Don't have an account? Sign up now