The NVMe Key Value Command Set has been standardized as one of the new I/O Command Sets. It allows access to data on an NVMe SSD using a key rather than a block address.

Key-Value vs 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).

Characteristics

Operations

Benifits

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.

Use cases

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).


参考资料:

  1. NVMe® Key Value Command Set Provides the Key to Storage Efficiency
  2. The Key to Value: Understanding the NVMe Key-Value Standard
  3. Key Value Command Set Specification
  4. Build a Key Value Flash Disk Based Storage System
  5. Transaction Support using Compound Commands in Key-Value SSDs
  6. SAKER: A Software Accelerated Key-value Service via the NVMe Interface