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
POST A COMMENT

61 Comments

View All Comments

  • XabanakFanatik - Thursday, June 14, 2018 - link

    Seriously? We get this instead of the 970 Pro or 905p review? Did anyone actually care about this drive? Reply
  • Billy Tallis - Thursday, June 14, 2018 - link

    Personally, I find doing a review like this to be a lot more interesting than testing an overpriced flagship product where I know going into it that the conclusion will be that a drive 1/2 or 2/3 the price is just as good for realistic use cases. It's interesting to explore the current state of the art for high-end tech, but it's more interesting to explore new tech in the context of something that might also be a sane purchase. Reply
  • XabanakFanatik - Thursday, June 14, 2018 - link

    I'm not sure how interest explains why you've reviewed this two days after it shipped but 7 weeks after you posted the 970 Evo review, there is no 970 pro review. Every other inferior review website posted the pro and evo reviews simultaneously, so Samsung must have sent you both drives around the same time.

    And Seriously, this is more interesting than reviewing the first optane refresh 905p?
    Reply
  • close - Thursday, June 14, 2018 - link

    They're usually very late with most reviews. Except Intel ones.

    Ostensibly because they want to provide the best information out there.
    Reply
  • Samus - Thursday, June 14, 2018 - link

    Need a review of a 970 Pro? Read the 970 Evo review and assume it’s moar better for proportionately moar money. Reply
  • bananaforscale - Monday, July 09, 2018 - link

    Not proportionately. Flagship products *never* have a price that's proportional to performance. Reply
  • artifex - Thursday, June 14, 2018 - link

    You already know a bazillion other sources for a 970 Evo review, so you're beating this guy up for being different? He says doing this review is more interesting for him, so no wonder he did it.

    Also, since you're calling Anandtech an inferior review site, he's hardly likely to change just for you, now.
    Reply
  • XabanakFanatik - Thursday, June 14, 2018 - link

    I was saying every other review site was inferior, yet they posted 970 PRO reviews the same time as 970 EVO reviews. My issue with Anandtech was the sole posting of the 970 EVO review and no 970 PRO review now for over 7 weeks.

    Nobody tests like Anandtech. I'm sad that the halo drives aren't a priority for Billy, since the market for them is actually really big.
    Reply
  • lmcd - Thursday, June 14, 2018 - link

    Most people I know look at the 970 EVO as the highest price drive they'll consider. I almost didn't even consider it. Reply
  • XabanakFanatik - Thursday, June 14, 2018 - link

    I can think of a half dozen people I know that would have never considered the 900 Pro drive at the previous price point that bought one after Samsung's mysterious price drop at launch of the 970 series. Lopping off 20-25% of MSRP tends to work pretty well to sell a new generation that was previously priced too high. Reply

Log in

Don't have an account? Sign up now