Question Can Virtual Machines take advantage of HMB (Host Memory Buffer)? What about DRAM?

Jul 5, 2023
3
0
10
I'm buying a new NVME SSD drive for my linux box, and on that linux box I run a lot of virtual machines (I use KVM virtualization). So my main question is whether an HMB ssd can perform just as well as the pricier DRAM ssds. Please note that I am NOT passing through the SSD drive to the guest OS (using something like PCI passthrough), I am just allocating a virtual disk drive as normal.

I'm no expert but my intuition tells me that the virtual machine can't use HMB, since afaik HMB requires the OS to interact with the hardware and virtualization usually doesn't allow that. I suspect that all disk IO has to go through the host OS. But in that case, if the host OS is the one doing all the IO, then it shouldn't matter if the drive is HMB or DRAM right? The guest OS can't take advantage of either, and the host OS can take advantage of both. Or am I incorrect, and the guest OS can take advantage of DRAM but not HMB?

What about paravirtualization? Do certain hypervisors take advantage of DRAM or HMB? I'm hoping some experts on virtualization can chime in here.
 
So my main question is whether an HMB ssd can perform just as well as the pricier DRAM ssds.
Theoretically no, since the SSD has to make at least two hops (PCIe Root complex -> Memory controller) to get to the data it may want. In practice? Probably won't matter.

I'm no expert but my intuition tells me that the virtual machine can't use HMB, since afaik HMB requires the OS to interact with the hardware and virtualization usually doesn't allow that. I suspect that all disk IO has to go through the host OS. But in that case, if the host OS is the one doing all the IO, then it shouldn't matter if the drive is HMB or DRAM right?

The guest OS can't take advantage of either, and the host OS can take advantage of both. Or am I incorrect, and the guest OS can take advantage of DRAM but not HMB?
The guest OS isn't aware of the host's hardware anyway. It's only exposed the VM's emulated hardware. So the guest OS doesn't know an HMB SSD exists. However, the guest OS VM still has to go through the host OS, so it doesn't matter anyway.

What about paravirtualization? Do certain hypervisors take advantage of DRAM or HMB?
That would depend on the Hypervisor.

Also there's nothing special needed if the SSD has its own DRAM. The host OS isn't even aware of that.
 
the SSD has to make at least two hops (PCIe Root complex -> Memory controller) to get to the data it may want. In practice? Probably won't matter.
Good to know, thanks. And this is true even under normal operation, when doing disk IO on the host right?
However, the guest OS VM still has to go through the host OS, so it doesn't matter anyway.
So it sounds like the fact that I'm running VM workloads, doesn't really come into play when considering HMB versus DRAM SSDs. Is that correct?