NVMe® Key Value Command Set Provides the Key to Storage EfficiencyBlog
By Bill Martin, SSD I/O Standards, Samsung
The NVM Express® Key Value (NVMe-KV) Command Set, ratified in June 2020, provides access to data on an NVMe® SSD namespace using a key, rather than a logical block address. Now that the NVMe-KV Command Set has been released as an official Command Set specification in the family of NVMe 2.0 specifications, it’s important to understand the NVMe-KV Command Set, its applications and industry use cases.
A new approach compared to traditional block storage
NVMe Key Value is a command set that allows you to access your data in a different manner than the traditional block storage mode of accessing data that we’re accustomed to. The NVMe-KV Command Set derives its name because its data is addressed by a key, which allows users to access a variable sized value (e.g., an object) and bypass the overhead of the host maintaining a translation table. The NVMe-KV Command Set allows you to specify a key, and then that key addresses the variable length piece of data. This key can address anything from a single byte, up to a significantly large amount of data (e.g. megabytes).
NVMe-KV Command Set improves storage performance
With traditional block storage, the drive stores blocks of a fixed size and they are identified by Logical Block Addresses. Using the NVMe-KV Command Set, you simply have a key that points to where your data is, and that data is called the value. That key is passed directly down to the device, allowing you to have a key to physical mapping that happens on the device, rather than having a mapping on the host from key to multiple logical block and then a mapping on the device from logical blocks to physical blocks. This approach increases the number of transactions per second, saves computation on the host and removes a translation layer, leading to performance benefits.
Another benefit is that the NVMe-KV Command Set removes provisioning overhead. For a logical block device that is over provisioned, meaning you have more logical addresses than you have physical space, you must de-allocate logical blocks when you want to reuse them. Key Value storage lets you bypass that step; when you delete a key value pair, that physical storage space is now a contiguous piece of physical storage and can be used again for a different key value pair without having to worry that you are reusing the same addressing mechanism for it.
NVMe-KV Command Set addresses key industry use cases (no pun intended)
Key Value is an effective way to support a variety of object storage protocols at the device level and architectural level. All applications that utilize an object storage format will benefit from Key Value– examples of this are Ceph, RocksDB and other applications of that nature dealing with objects.
A specific use case I like to reference is if you are storing records associated with a unique identifier, such as a medical record or employee number. For this example, your key becomes the medical record number or employee number, and it indexes directly to the entire record for that particular information.
Another use case we are seeing emerge is with computational storage tasks. For example, when doing computation on a picture, we can pass the key, and that key points to the whole picture (rather than sending it a whole bunch of logical blocks and a length of logical blocks that make up that picture).
These are just a few examples of the many applications the NVMe-KV Command Set could apply to. We look forward to seeing how the NVMe-KV Command Set is utilized in the real world as new use cases emerge.
Take advantage of the NVMe-KV Command Set today
Readers can hear more about the NVMe-KV Command Set by watching my NVM Express interview, or watching my full-length presentation with SNIA. Developers interested in the NVMe-KV Command Set can download the specification on the NVM Express website and utilize SNIA’s application programming interface (API) for accessing Key Value.
Interested in learning more? I encourage you to view the series of NVMe 2.0 specifications video interviews on the NVM Express YouTube Channel to become an expert on the new features and Command Sets.