Skip to content

investigate nvsnap checkpoint/restore for Dynamo aggregated and disaggregated modes #1009

Description

@balajinvda

Context

We were asked how nvsnap checkpoint/restore behaves for Dynamo deployments in
aggregated and disaggregated mode. nvsnap currently has no Dynamo integration:
grep -ri dynamo src/compute-plane-services/nvsnap/ returns nothing. This issue
tracks the investigation before we make any claim about support.

What is already established

Dynamo topology (from NVIDIA Dynamo docs):

  • Aggregated: one worker performs both prefill and decode in a single process
    and pod.
  • Disaggregated: separate prefill and decode pods. The prefill worker's KV
    cache is transferred into the decode worker's VRAM.

The transport is NIXL, which supports RDMA/InfiniBand, RoCE via UCX, TCP
fallback, NVMe-oF and S3. Dynamo docs state deployments instantiate the UCX
backend and that NIXL stages transfer metadata through the pod's /dev/shm.

The in-repo sample at
examples/function-samples/helmchart-samples/dynamo-operator-sample deploys the
disaggregated shape:

--disaggregation-mode prefill
--kv-transfer-config '{"kv_connector":"NixlConnector","kv_role":"kv_both"}'
--kv-events-config '{"publisher":"zmq","endpoint":"tcp://*:20080",...}'
--tensor-parallel-size <nodeCount * gpus>

with etcd and NATS for coordination.

Relevant nvsnap constraints:

  • CRIU cannot dump processes using RDMA (criu fails for RDMA programs checkpoint-restore/criu#267), and
    restoring InfiniBand verbs hits queue-pair and memory-region collisions that
    upstream CRIU does not solve.
  • nvsnap has no NIXL, UCX or RDMA handling. The only RDMA-adjacent code
    externalizes the gdrdrv device node, which is not the same as checkpointing
    live RDMA state.
  • Multi-GPU process checkpoint does not work today. Workers with tensor
    parallelism above 1 can only use the cache-directory capture path.
  • External TCP sockets are destroyed before checkpoint; intra-pod connections
    are preserved.
  • Dynamo publishes KV events over ZMQ, which is the class of state our
    interception library exists to repair after restore.

Assessment to validate

  • Aggregated with TP=1 is closest to what already works: one pod, one process
    tree, GPU state via cuda-checkpoint. Open work is coordination re-registration
    and the ZMQ event socket.
  • Aggregated with TP above 1 is blocked by the existing multi-GPU limitation.
  • Disaggregated is a distributed snapshot problem rather than a harder
    single-pod one: two pods, live GPU-to-GPU transport, in-flight transfers, and
    cluster-wide registration.

The question that decides the design

Can Dynamo workers rejoin after an abrupt restart? They run under Kubernetes, so
they very likely tolerate pod loss: the router re-routes and the worker
re-registers. If that holds, we may not need to checkpoint transport state at
all. We could drop NIXL, ZMQ and coordination state at capture and let it
re-establish on restore, which is what we already do for external TCP.

Dynamo's published guides do not document failure or restart semantics, so this
must be answered from the Dynamo source rather than inferred.

Tasks

  • Determine from Dynamo source whether workers re-register after an abrupt
    restart, and what the router does with in-flight requests.
  • Determine whether NIXL connections are long-lived or established per
    request. This materially changes the disaggregated answer.
  • Stand up an aggregated TP=1 Dynamo worker and attempt a capture/restore
    end to end.
  • Establish what a restored worker must re-do: coordination registration,
    ZMQ event publisher, NIXL agent metadata in /dev/shm.
  • Decide whether the cache-directory path alone is the near-term answer for
    Dynamo, since it is engine-agnostic and topology-agnostic.
  • Record the interception-library dependency, given the intent to reduce
    reliance on patched ZMQ.

Out of scope for now

Disaggregated checkpoint/restore across pods. Record findings, but do not design
for it until the restart-semantics question above is answered.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions