Networking DOCA SDK Documentation

DOCA Memos

Introduction

NVIDIA DOCA™ Memos provides the libraries, APIs, and reference applications for building KV-cache services for large-scale AI inference workloads. It stores and retrieves KV-cache blocks on NVIDIA CMX, a shared context-memory tier for AI inference. Inference nodes use this tier through Key/Value store, retrieve, and existence-check operations.

DOCA Memos is designed for workloads where KV-cache data is large, immutable, and recoverable. The design assumes the following:

  • The inference pipeline can regenerate KV-cache data that isn't found.

  • KV-cache blocks are written once and aren't modified in place.

  • Keys are derived from stable cache identifiers, such as prefix hashes.

  • Applications can tolerate lookup misses and fall back to another cache tier or to recomputation.

DOCA Memos covers the KV-cache data path. It doesn't provide a complete storage product, cluster manager, tenant lifecycle system, SSD management layer, policy engine, or operational control plane. The services that you build on DOCA Memos provide these functions.

The DOCA Memos APIs are an initial definition and might change as the architecture evolves. Backward compatibility isn't guaranteed. For the quality level of each DOCA library, see DOCA Libraries.

Prerequisites

The DOCA Memos libraries follow the DOCA Core programming model. Before you use them, read DOCA Core. To install the DOCA development packages, see DOCA Installation Guide for Linux.

DOCA Memos Libraries

The following table lists the DOCA Memos libraries in the order that a Key/Value request passes through them: from the inference node's host, through its NVIDIA® BlueField® DPU, to a CMX data node.

Library

Runs On

Role

DOCA Key-Value

Inference node host

Submits asynchronous Key/Value operations from a host application to an NVMe Key/Value namespace.

DOCA DevEmu NVMe

BlueField DPU

Implements the emulated NVMe controller that the host uses to reach the Key/Value namespace.

DOCA Memos Initiator

BlueField-3 or BlueField-4 DPU

Connects to DOCA Memos targets, discovers their namespaces, composes them into logical volumes, and submits asynchronous Key/Value tasks.

DOCA Memos Target

BlueField Storage Controller

Receives Key/Value commands from initiators and translates them into block-level READ and WRITE requests that your application performs on the backing storage.

Key/Value Request Path

The following sequence describes how a Key/Value request moves between the libraries:

  1. An application on the host, such as a KV-cache manager, submits a Key/Value operation through DOCA Key-Value. DOCA Key-Value sends it as an NVMe Key/Value command to an emulated NVMe device.

  2. On BlueField, a service built on DOCA DevEmu NVMe receives the command and submits it as a DOCA Memos Initiator task on a DOCA Memos volume.

  3. DOCA Memos Initiator uses the volume's key-placement mapping to select a namespace, and sends the operation over RDMA to the CMX data node that exposes that namespace.

  4. On the CMX data node, DOCA Memos Target receives the operation and issues block-level READ and WRITE requests to your application, which performs them on the backing storage.

You build the BlueField service and the CMX data node application with these libraries. For a reference implementation of each, see Reference Applications and Samples.

Initiator and Target Settings That Must Match

Configure the following settings consistently on the target and on each initiator that connects to it. For an example that uses the reference applications, see DOCA Memos Reference Application.

Setting

DOCA Memos Target API

DOCA Memos Initiator API

Requirement

Address family

doca_memos_target_port_create_attr_set_adrfam()

doca_memos_initiator_dev_target_create_attr_set_adrfam()

Both libraries support IPv4 and IPv6.

Transport address and service ID

doca_memos_target_port_create_attr_set_traddr()

doca_memos_target_port_create_attr_set_trsvcid()

doca_memos_initiator_dev_target_create_attr_set_traddr()

doca_memos_initiator_dev_target_create_attr_set_trsvcid()

Set the initiator to the address and service ID that the target port listens on.

Subsystem identity

doca_memos_target_subsys_set_nqn()

doca_memos_initiator_dev_target_create_attr_set_subnqn()

Set the initiator's subsystem identity to the NVMe Qualified Name (NQN) of the target subsystem.

Tenant ID

doca_memos_target_subsys_ns_set_tenant_id()

doca_memos_initiator_dev_volume_create_attr_set_tenant_id()

Initiators must supply the namespace's tenant ID to perform I/O on it. Both default to 0.

Maximum value length

doca_memos_target_subsys_ns_set_max_value_len()

doca_memos_initiator_dev_volume_create_attr_set_max_value_len()

The volume's maximum value length must not exceed that of any namespace attached to it.

Reference Applications and Samples

These reference applications and samples show how to use the DOCA Memos libraries. They aren't production-ready; use them as reference only.

Last updated: