NVME Host Memory Buffer reporting??

buddywh

Active Member
Does HWInfo currently report back any information on SSD utilization of a Host Memory Buffer (HMB)? If not, could that be a feature to add? As I understand it a HMB is used by some DRAM-less SSD drives to take the place of the on-drive DRAM buffers used for address mapping tables and are usually fairly small, under 100MB.

At first I assumed the Crucial P3 Plus NVME SSD drive I recently installed set up its HMB with the Windows default NVME drivers. But when I found and installed an NVME driver from Micron's (Crucial's parent company) support site along with it's control panel (Storage Executive) I discovered I had to enable it's HMB features. It would be good to know from an independent and reliable system-level utility like HWInfo64 that it's being utilized.
 
Last edited:
I'm sorry but I have no idea how to detect this feature. It might be just some software feature that's specific to each vendor's software/drivers.
 
I'm sorry but I have no idea how to detect this feature. It might be just some software feature that's specific to each vendor's software/drivers.

This would be really nice to have, so I researched it a little in the hopes to help with this.

  • Afaik, it is part of the NVMe spec since NVMe 1.2. It isn't propriety or vendor specific (except that the vendor decides whether to enable it or not)
  • The default Windows drivers supports it (starting with Win 10 1607) and enables it if the SSD requests/supports it and most DRAM-less SSDs support it. Thus, pretty much everybody with a DRAM-less SSD on Windows already uses it.
  • How can it be controlled?
    HMB on/off can be done in windows registry on this key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorPort
    DWORD - HMBAllocationPolicy (values: 0 = off,1 = 8MB buffer,2= 64MB buffer, 3 = firmware controled buffer size)

    source
  • There is a tool that displays the relevant information. The tool works vendor independent but it does not work with the latest Windows 11. It works on older versions (Win 10, Win Server 2019). The readme of that tool is garbeld unfortuntly (or requires chinese codepage?) but I did notice it mentions stornvme (Standard NVM Express Controller).
    • example (SSD with DRAM cache).
      Code:
      >C:\nvme-hmb.exe
      NVME SSD HMB Info v0.21a by Ochkin Vadim
      0: (KINGSTON SKC3000D2048G
      Please select drive number:0
      DiskName: \\.\PhysicalDrive0
      ScsiName: \\.\SCSI1:
      Disk: KINGSTON SKC3000D2048G
      FW  : EIFK31.6
      
      Idenify info:
      Namespaces        : 1
      HMB Preffered Size: 0 KB
      HMB Minimum Size  : 0 KB
      Unalloc capacity  : 0 MB
      IOCtl: GetFeature failed 0x45d!
      
      HMB info:
      HMB              : Disabled
      HMB Size         : 0 M
      DescriptorListAdr: 0x00000000:00000000
      Entries          : 0
      
      Press any key to exit
    • example (SSD without DRAM cache and with HMB)
      Code:
      PS C:\nvme-hmb.exe
      NVME SSD HMB Info v0.21a by Ochkin Vadim
      0: (SanDisk Ultra II 960GB
      1: (SanDisk Ultra II 960GB
      2: (Lexar SSD NM790 4TB
      3: (Lexar SSD NM790 4TB
      4: (Lexar SSD NM790 4TB
      5: (Lexar SSD NM790 4TB
      Please select drive number:2
      DiskName: \\.\PhysicalDrive2
      ScsiName: \\.\SCSI5:
      Disk: Lexar SSD NM790 4TB
      FW  : 12237
      
      Idenify info:
      Namespaces        : 1
      HMB Preffered Size: 40960 KB
      HMB Minimum Size  : 40960 KB
      Unalloc capacity  : 0 MB
      
      HMB info:
      HMB              : Enabled
      HMB Size         : 40 M
      DescriptorListAdr: 0x00000001:f6af5000
      Entries          : 1
      
      Press any key to exit
      source: http://vlo.name:3000/ssdtool/ (http://vlo.name:3000/tmph/nvme-hmb.rar
  • You can check for it in event log
    StorPort HMB.png
  • As for getting this info out of the OS: Possibly through a driver API?
    Microsoft's documentation:
    • nvme.h
      Code:
      A NVME_CONTROLLER_MEMORY_BUFFER_LOCATION structure that specifies the location of the Controller Memory Buffer.If the value of CMBSZ is 0, this register is reserved.
      
      The (Optional) Controller Memory Buffer Location register starts at Offset 38h.
      
      CMBSZ
      
      A NVME_CONTROLLER_MEMORY_BUFFER_SIZE structure that specifies the size of the Controller Memory Buffer.
      
      If the controller does not support the Controller Memory Buffer feature then this register is cleared to 0h.
      
      The (Optional) Controller Memory Buffer Size register starts at Offset 3Ch.
    • storport.h
      StorPortAllocateHostMemoryBuffer function
      Code:
      StorPortAllocateHostMemoryBuffer allocates one or more ranges of physically contiguous memory to be used as a Host Memory Buffer (HMB).
      [in] PreferredBytes
      
      The amount of memory the device prefers, in bytes. This must be a multiple of the page size.
      
      [in] UtilizationBytes
      
      The total number of blocks allocated on the device, in bytes.
Does this help?
 
Thanks for your analysis and information!
Looking at that, HWiNFO should be able to report the Controller Memory Buffer Size available for use by the host.
 
Back
Top