You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a vendor-neutral S3-over-RDMA data path to the object plugin's standard
S3 client, implementing the published `x-amz-rdma-*` protocol (NVIDIA cuObject /
aws-c-s3 convention). Any compliant endpoint (MinIO AIStor today, and AWS S3 if
it adopts it) works with no per-vendor code.
What it does:
- New s3/rdma_protocol.h (dependency-free wire helpers; unit tested) and
s3/rdma.{h,cpp} (cuObject token API: cuMemObjGetRDMAToken/PutRDMAToken, plus
a SigV4 UNSIGNED-PAYLOAD control plane that carries x-amz-rdma-token and reads
x-amz-rdma-reply / x-amz-rdma-bytes-transferred).
- RDMA is an explicit opt-in via the `gds=true` backend param. The standard
client attempts RDMA for registered DRAM/VRAM buffers; VRAM (GPU-direct) is
advertised only under gds + an available fabric.
- No automatic HTTP fallback: an RDMA decline/failure under gds is a hard error.
Auto-fallback relies on the server returning x-amz-rdma-reply:501 for
unsupported RDMA; a server that silently ignores the token would accept a
body-less PUT as a 0-byte object. Until that contract is universal we require
the explicit opt-in. The future fallback path is documented in code/README.
- Fail-safe PUT: success is reported only when the server returns
x-amz-rdma-reply:200/204, so a misconfigured (non-RDMA) endpoint errors
instead of silently writing a 0-byte object.
Why not s3_accel/dell: the legacy Dell engine uses a non-standard x-rdma-info
header, a static whole-backend engine selection, and a PUT that does not check
any reply header. It is kept for backward compatibility (accelerated=true,
type=dell) but is deprecated and superseded by this path; see
s3_accel/TODO.md for the removal plan.
Docs: RDMA_PROTOCOL.md documents the server-side wire contract and a vendor
compliance checklist; README gains a GPU-Direct section and marks
accelerated/type as deprecated. nixl_object_test gains -g/--gds (and -v works
with --gds); -a/--accelerated is marked deprecated.
Note: the AWS SDK control-plane code in s3/rdma.cpp compiles only with
cuobjclient + aws-sdk-cpp present and is validated on RDMA hardware; the
protocol layer is covered by a unit test (test/gtest/unit/obj/rdma_protocol.cpp).
Signed-off-by: Harshavardhana <harsha@minio.io>
|`x-amz-rdma-reply`| response | Outcome marker. **Required on success.**`200`/`204`/`206` = success; `501` (or absent) = server declined RDMA. Under `gds=true` the client treats a decline as a hard error (no automatic HTTP fallback today — see README). |
46
+
|`x-amz-rdma-bytes-transferred`| response (GET) | Actual bytes moved over RDMA (may be `< requested` for ranged GETs). |
47
+
|`ETag`, `x-amz-checksum-crc64nvme`| response (PUT) | Standard S3 result metadata. |
Copy file name to clipboardExpand all lines: src/plugins/obj/README.md
+107-3Lines changed: 107 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,8 +70,9 @@ Backend parameters are passed as a key-value map (`nixl_b_params_t`) when creati
70
70
|`resp_checksum`| Response checksum validation (`required`/`supported`) | - | No |
71
71
|`ca_bundle`| path to a custom certificate bundle | - | No |
72
72
|`crtMinLimit`| Minimum object size (bytes) to use S3 CRT client for high-performance transfers | Disabled****| No |
73
-
|`accelerated`| Enable S3 Accelerated engine (`true`/`false`) |`false`| No |
74
-
|`type`| Accelerated engine type (`dell`, etc.) | - | No |
73
+
|`gds`| Enable GPU-direct S3-over-RDMA on the standard client (`true`/`false`). Opt-in; requires an endpoint that implements the protocol. See [GPU-Direct (S3 over RDMA)](#gpu-direct-s3-over-rdma). |`false`| No |
74
+
|`accelerated`|**(Deprecated/Legacy)** Enable a registry-provided vendor accel engine (`true`/`false`). Superseded by `gds`; kept for legacy Dell. |`false`| No |
75
+
|`type`|**(Deprecated/Legacy)** Vendor accel engine type (`dell`). Superseded by `gds`. | - | No |
75
76
76
77
\* If `access_key` and `secret_key` are not provided, the AWS SDK will attempt to use default credential providers (IAM roles, environment variables, credential files, etc.)
77
78
@@ -215,6 +216,102 @@ This configuration automatically uses the high-performance S3 CRT client for obj
215
216
216
217
> **Part size and the 5 MiB floor**: AWS S3 requires a minimum part size of 5 MiB for all parts except the last. If `crtMinLimit` is set below 5 MiB, the CRT SDK silently clamps the part size to 5 MiB (logging a warning) while still triggering multipart at `crtMinLimit`. Objects smaller than 5 MiB are uploaded as a single-part multipart request, which S3 permits. The 5 MiB minimum is an AWS service constraint and cannot be bypassed. To avoid the silent clamp, use `crtMinLimit >= 5242880` (5 MiB).
217
218
219
+
## GPU-Direct (S3 over RDMA)
220
+
221
+
When built against the `cuobjclient` library, run on a host with an RDMA fabric
222
+
(InfiniBand or RoCEv2), and **explicitly enabled with `gds=true`**, the standard
223
+
S3 client accelerates GET/PUT using **GPU-direct S3 over RDMA**. This is the
224
+
idiomatic path; enable it only against an endpoint you know implements the
3. The server performs an `RDMA_WRITE` (GET) or `RDMA_READ` (PUT) **directly
252
+
to/from the registered buffer** — including GPU VRAM — bypassing the host CPU
253
+
and the HTTP body.
254
+
4. The server confirms with `x-amz-rdma-reply: 200/204/206` and reports the
255
+
moved byte count via `x-amz-rdma-bytes-transferred`.
256
+
257
+
### No automatic fallback (yet)
258
+
259
+
RDMA is an **explicit opt-in** (`gds=true`), not an auto-probe, and when enabled
260
+
an RDMA decline/failure is a **hard error** — the client does *not* silently fall
261
+
back to HTTP. This is deliberate:
262
+
263
+
- The fallback handshake relies on the server returning `x-amz-rdma-reply: 501`
264
+
(or omitting the reply header) when it cannot honor RDMA. A server that instead
265
+
**silently ignores**`x-amz-rdma-token` would accept our `Content-Length: 0`
266
+
body-less PUT as a legitimate **zero-byte object** and return `200`+ETag —
267
+
silent data loss. The client cannot safely distinguish that case by probing.
268
+
- So the caller asserts RDMA support via `gds=true`; if the endpoint then
269
+
declines, that is a misconfiguration worth surfacing, not papering over.
270
+
271
+
> **Fail-safe PUT:** even under `gds=true`, a PUT is reported successful **only**
272
+
> when the server returns `x-amz-rdma-reply: 200/204`. A bare HTTP `200` is never
273
+
> trusted, so a mistaken endpoint surfaces as an error rather than a silent
274
+
> zero-byte write. (GET is inherently safe: an absent reply header reads as a
275
+
> decline.)
276
+
>
277
+
> **FUTURE — transparent fallback.** Once server implementations universally
278
+
> return `x-amz-rdma-reply: 501` for unsupported RDMA, the client can safely
279
+
> auto-detect RDMA and fall back to HTTP for host (DRAM) memory — making `gds`
280
+
> unnecessary. The building blocks (reply parsing, the synchronous HTTP path) are
281
+
> in place; the fallback is intentionally disabled until that contract is
282
+
> universal. VRAM can never fall back (the SDK cannot stream a GPU pointer).
283
+
284
+
### Why this supersedes the legacy `s3_accel` vendor engines
285
+
286
+
The earlier `s3_accel/` path (e.g. `s3_accel/dell`, selected via
287
+
`accelerated=true, type=dell`) is **retained only for backward compatibility**.
288
+
It is not the recommended approach and is protocol-incorrect for general use:
289
+
290
+
- It uses a **non-standard `x-rdma-info`** header instead of the established
291
+
`x-amz-rdma-token` / `x-amz-rdma-reply` convention, so it only works against
292
+
one vendor's server.
293
+
- It sends `Content-Length: 0` PUTs **without checking any RDMA reply header**,
294
+
so against a non-RDMA endpoint it silently writes 0-byte objects.
295
+
- It has **no fallback**: RDMA selection is a static, whole-backend choice made
296
+
at `createBackend` time, not a per-transfer negotiation.
297
+
- It models RDMA as a **separate vendor engine** behind a registry, requiring
298
+
bespoke per-vendor code, when RDMA is really just a transparent client
299
+
capability.
300
+
301
+
The generic path above fixes all four: it is a per-transfer capability of the
302
+
standard client, follows the public protocol, fails safely on a non-RDMA
303
+
response instead of writing a 0-byte object (no silent fallback — see [No
304
+
automatic fallback (yet)](#no-automatic-fallback-yet)), and needs **no per-vendor
305
+
code** — any vendor that complies with the protocol is supported automatically.
306
+
307
+
### Protocol specification (for storage vendors)
308
+
309
+
The full wire contract — headers, token format, transport, server obligations,
310
+
the fail-safe success rule, and a compliance checklist — is documented in
311
+
[**RDMA_PROTOCOL.md**](RDMA_PROTOCOL.md). A storage vendor that implements that
312
+
contract on its S3 server is supported by this client out of the box, with no
313
+
NIXL-side changes.
314
+
218
315
## Transfer Operations
219
316
220
317
The Object Storage backend supports read and write operations between local memory and S3 objects. Here are the key aspects of transfer operations:
@@ -259,7 +356,14 @@ The client selection happens transparently during transfer operations, requiring
259
356
- The `checkXfer` function can be used to poll for operation completion
260
357
- The request handle must be released using `releaseReqH` after the operation is complete
261
358
262
-
## Extending with Vendor-Specific Implementations
359
+
## Extending with Vendor-Specific Implementations (Legacy)
360
+
361
+
> **⚠️ Legacy.** This vendor-engine + registry mechanism is retained for
362
+
> backward compatibility only. For GPU-direct/RDMA acceleration, prefer the
363
+
> built-in [GPU-Direct (S3 over RDMA)](#gpu-direct-s3-over-rdma) path, which is
364
+
> transparent, protocol-compliant, and requires no per-vendor code. A new vendor
365
+
> only needs to implement the standard `x-amz-rdma-*` protocol on its server to
366
+
> be supported automatically; no NIXL-side engine is required.
263
367
264
368
The object plugin uses a modular, inheritance-based architecture that makes it easy to add vendor-specific backends without modifying core engine logic.
0 commit comments