Notice

This document is for a development version of Ceph.

S3 RDMA with cuObject

Ceph Object Gateway can use NVIDIA cuObject to transfer S3 object data between client memory and the RGW daemon over RDMA. S3 requests, authentication, metadata, and responses still use the HTTP frontend. Source and RPM builds include cuObject support. RDMA transfers are disabled at runtime until rgw_cuobj_enabled is set to true.

Warning

S3 RDMA with cuObject is an experimental feature intended for testing and evaluation. Configuration options and behavior may change between releases. Runtime activation requires setting rgw_cuobj_enabled to true and configuring an RDMA interface address. Source and RPM builds include the support.

See NVIDIA cuObject documentation for the library architecture and cuObject client API for client integration.

Architecture

S3 RDMA separates HTTP request handling from object-data transfer:

S3 client                         RGW daemon
---------                         ----------
S3 API            <-- HTTP -->    Frontend and request processing
Registered memory <-- RDMA -->    Registered host buffer pool
                                               |
                                      RGW filters and storage
                                               |
                                          Ceph cluster

For PUT requests, RGW reads the payload from the client’s registered memory into a registered host buffer, then passes it through the normal upload filters and storage writer. For GET requests, RGW collects the response after the download filters have run, writes it to the client’s registered memory, and then sends the HTTP success response. The RGW daemon uses host memory for these buffers; it does not require a GPU.

The RDMA network connects the client to the RGW daemon. RGW continues to use its normal storage path to access the Ceph cluster. Enabling S3 RDMA does not change the network protocol between RGW and the OSDs.

Implementation

  • The S3 PUT and GET paths use cuObject for object data when the server is available and the request contains an RDMA token.

  • Multipart upload parts and ranged GET responses can use RDMA independently, subject to the per-transfer buffer limit.

  • Authentication, authorization, metadata, and request status use the S3 HTTP interface. Existing upload and download filters still process object data.

  • HEAD requests return metadata over HTTP and do not transfer object data. Requests without an RDMA token use the ordinary HTTP data path.

Requirements

The RGW host and client must have a working RDMA network with Dynamic Connection (DC) support. RGW uses the CUOBJ_PROTO_RDMA_DC_V1 protocol over InfiniBand or RoCEv2. Use NVIDIA Mellanox ConnectX-5 or newer adapters with drivers and firmware supported by cuObject. ConnectX-4 is not supported. The RGW host must be able to reach the client memory advertised in the RDMA token, including when HTTP requests arrive through a proxy or load balancer.

Install the following components in addition to the normal Ceph dependencies:

  • On the RGW host, the cuObject server runtime library libcuobjserver (the development headers are not needed). The integration requires cuObject server 2.x (tested with RPM version 2.0.0.109-1). NVIDIA supports the server runtime on x86_64 and ARM64. Use the cuObject server downloads and cuObject server release notes for installation instructions and supported platforms. RGW binds the library’s entry points at runtime, so a release with an incompatible ABI is rejected or may need an RGW update.

  • RDMA drivers and runtime libraries, including libibverbs and librdmacm, on the RGW host. The client also needs the RDMA runtime.

  • On the client, an S3 application integrated with the cuObject client library, together with its CUDA Toolkit and GPUDirect Storage dependencies. See the cuObject client release notes for the supported combinations. An ordinary S3 client continues to use HTTP for object data.

Example installation flow

The following example installs the cuObject server runtime and RDMA libraries on a Rocky Linux 10 x86_64 host. Install them where RGW runs, including for a local vstart.sh cluster. Neither install-deps.sh nor vstart.sh installs NVIDIA packages or adds NVIDIA repositories. RGW does not need the NVIDIA development headers, CUDA toolkit, or client packages.

sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel10/x86_64/cuda-rhel10.repo
sudo dnf install -y libcuobjserver-2.0.0.109-1 libibverbs librdmacm numactl-libs

Use the matching RHEL repository for Rocky Linux, AlmaLinux, RHEL, and CentOS Stream 9 or 10. For EL9, replace both occurrences of rhel10 in the URL with rhel9. For aarch64, replace the URL’s x86_64 directory with sbsa. See the CUDA Toolkit downloads and cuObject server release notes for other platforms and supported configurations. NVIDIA’s Fedora repository lacks libcuobjserver; these runtime installation instructions do not apply to Fedora. RGW and its hardware-free cuObject unit tests can still be built and run on Fedora without the NVIDIA runtime.

On hosts that run the S3 client application, configure the appropriate NVIDIA repository and install the CUDA, GPUDirect Storage, and cuObject client packages. Adjust the 13-4 suffix to the CUDA release you deploy:

sudo dnf install cuda-13-4 cuda-toolkit-13-4
sudo dnf install nvidia-gds-13-4
sudo dnf install libcuobjclient-13-4 libcuobjclient-devel-13-4

RDMA development and diagnostic tools can also be installed as needed:

sudo dnf install -y rdma-core rdma-core-devel libibverbs-utils infiniband-diags perftest iproute

Running as a non-root user

For running the RGW/cuObject server as a non-root user:

  • Sufficient locked-memory allowance: use ulimit -l unlimited before launching RGW, provided the administrator-configured hard limit permits it. For systemd, use LimitMEMLOCK=infinity. A finite limit must cover the configured buffer pool: 1 GiB per RGW daemon by default, plus library overhead. See the systemd resource-limit documentation.

  • Access to RDMA devices: the RGW user needs read/write permission on the required /dev/infiniband/uverbs* and /dev/infiniband/rdma_cm devices, granted through appropriate groups, udev rules, or ACLs. Linux supports unprivileged RDMA subject to device permissions and locked-memory limits. See the Linux RDMA documentation.

  • Devices exposed to the process: systemd or container isolation must permit access to those RDMA devices. The RGW systemd unit in systemd/ceph-radosgw@.service.in has PrivateDevices=yes, which needs an appropriate override. Containers must expose and permit access to the required devices.

  • Runtime libraries and drivers available: install libcuobjserver.so.2, the appropriate RDMA drivers, and libraries including libibverbs and librdmacm. The runtime libraries must be accessible to RGW, including inside its container. See the NVIDIA cuObject server requirements and installation.

An administrator may need to configure these prerequisites before RGW runs under its service account.

Limitations

  • Each PUT payload or GET response must fit in one registered server buffer. The default limit is 8 MiB, including each part of a multipart upload or each selected GET range. See Memory Sizing and Transfer Limits.

  • A zero-length RDMA PUT is rejected. Create empty objects with ordinary HTTP PUT requests. Empty-object GETs can succeed without an RDMA data transfer.

  • A client must keep its memory registration valid until the request has completed and follow the cuObject library’s error-handling requirements.

  • RGW reports transfer failures over HTTP. After choosing RDMA for a request, it does not automatically retry that transfer through the HTTP body.

S3 RDMA Environment Setup

Building

Follow Build Ceph to prepare a Ceph source build. cuObject support is always included when building RGW and uses the ABI shim; the NVIDIA SDK is not needed to build. The shim loads the hardcoded runtime library libcuobjserver.so.2 with dlopen() when rgw_cuobj_enabled is set, so the same binaries run with or without it. If loading or initialization fails, RGW logs the reason and keeps serving ordinary HTTP requests; S3 requests carrying an RDMA token fail with HTTP 500. For a new build directory, run from the Ceph source directory:

./do_cmake.sh
cmake --build build --target radosgw --parallel

RPM builds also include cuObject support, use the ABI shim, and have no NVIDIA build or package dependency.

For a container RPM build:

./src/script/build-with-container.py -d rocky10 -e source-rpm -e rpm

The explicit source-rpm step regenerates the SRPM with the updated spec; -e rpm alone may reuse an existing SRPM. Commit source and CMake changes first: make-dist archives HEAD when creating the source tarball. See ContainerBuild.md for general build image options. CONFIGURE_ARGS applies to source builds and does not control RPM builds. To pass it into a source build container, use --extra=-eCONFIGURE_ARGS or an --env-file.

The cuObject server library libcuobjserver.so.2 and its runtime dependencies must be available to the deployed RGW daemon for RDMA. Its name is fixed to the supported ABI major version; there is no library-path config option. Required entry points are resolved by symbol name at runtime, and a library missing any required symbol is rejected. The WITH_RDMA option controls Ceph’s async messenger; enabling it alone does not enable cuObject support in RGW.

Installing the runtime in a development container

Building Ceph or running the hardware-free cuObject unit tests does not require the NVIDIA runtime. To run RGW with RDMA inside a development container, install the server library and its dependencies in that image. Installing them on the host does not make them available inside a container.

Use the generic --custom-image-build-command option to add the NVIDIA repository and pinned server runtime. For Rocky Linux 10 on x86_64:

./src/script/build-with-container.py --container-engine=podman \
  -d rocky10 --tag=+cuobj \
  --custom-image-build-command='dnf install -y dnf-plugins-core' \
  --custom-image-build-command='dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel10/x86_64/cuda-rhel10.repo' \
  --custom-image-build-command='dnf install -y libcuobjserver-2.0.0.109-1 libibverbs librdmacm numactl-libs' \
  -e build-container

The commands run as root inside the image, after the normal build dependency setup. --tag=+cuobj gives the image a distinct tag; -e build-container builds only the image. Reuse the same tag and custom commands on subsequent invocations, since custom commands are included in the image cache check. Replace -e build-container with -e build to build Ceph sources, or -e source-rpm -e rpm to build RPMs using this image.

For EL9, use -d rocky9 and the rhel9 repository URL. The repository and architecture substitutions described above also apply here. These Rocky container commands can also be run on AlmaLinux or RHEL hosts.

These commands do not add NVIDIA dependencies to the Ceph RPMs. The deployed RGW host or runtime container needs its own library installation. Running RDMA inside a container also requires access to the RDMA devices and sufficient locked memory, as described under “Running as a non-root user” above.

Running

Set rgw_cuobj_enabled and rgw_cuobj_rdma_ip for each RGW daemon that will serve RDMA requests. Use an address assigned to that daemon’s RDMA-capable interface. The address has no default. For example, for a daemon whose Ceph client name is client.rgw.8000:

ceph config set client.rgw.8000 rgw_cuobj_rdma_ip 192.0.2.10
ceph config set client.rgw.8000 rgw_cuobj_rdma_port 20886
ceph config set client.rgw.8000 rgw_cuobj_enabled true

Replace the example client name and IP address with those for your deployment. The cuObject port is separate from the HTTP frontend port. Configure an appropriate RDMA address and port for each daemon when running multiple RGWs on one host. Keep the normal rgw_frontends configuration for S3 requests.

Restart the RGW daemon after changing cuObject settings. RGW creates the cuObject server and registers its buffer pool during startup. These settings are not applied to an already initialized server.

If initialization fails, including when the cuObject library is not installed, RGW logs cuObj RDMA server init failed and continues serving HTTP requests with RDMA disabled. Requests that carry an RDMA token fail with HTTP 500. Check the library installation, RDMA address, device access, and available registered memory before restarting.

Memory Sizing and Transfer Limits

The pool is shared by PUT and GET requests. Each transfer holds one buffer:

  • rgw_cuobj_buffer_size limits a single PUT payload, an individual multipart-upload part, or a GET response. The default is 8 MiB. For a ranged GET, only the selected range needs to fit.

  • rgw_cuobj_buffer_count limits the number of transfers that can hold buffers simultaneously. The default is 128. Increasing the count does not increase the size limit.

The registered pool size is rgw_cuobj_buffer_size * rgw_cuobj_buffer_count per daemon, in addition to other RGW memory and cuObject resources. For example, 64 buffers of 16 MiB still require 1 GiB of registered memory, while allowing larger transfers with fewer simultaneous buffer users:

ceph config set client.rgw.8000 rgw_cuobj_buffer_size 16M
ceph config set client.rgw.8000 rgw_cuobj_buffer_count 64

Restart the daemon for the new pool to take effect. Configure positive buffer sizes and counts within the memory-registration limits of the installed cuObject runtime and devices.

When all suitable buffers are busy, or a transfer exceeds the buffer size, RGW returns HTTP 503 ServiceUnavailable. There is no automatic HTTP retry after an RDMA transfer has been selected. Reduce concurrency for pool exhaustion. For larger objects, use smaller multipart-upload parts, ranged GETs, a larger configured buffer, or an ordinary HTTP transfer. Other S3 request-size and multipart constraints still apply. Retrying an oversized request without changing its size or the buffer configuration will continue to fail.

Client Setup and Verification

Configure a cuObject-aware S3 client with the RGW HTTP endpoint, S3 credentials, and the client’s RDMA interface. The HTTP endpoint and RDMA interface can use different networks, but the client memory advertised by the token must be reachable from RGW. Follow the client’s instructions for installing and configuring its cuObject and GPUDirect Storage dependencies.

Check the configured server settings, using the same daemon name as in the setup commands:

ceph config get client.rgw.8000 rgw_cuobj_enabled
ceph config get client.rgw.8000 rgw_cuobj_rdma_ip
ceph config get client.rgw.8000 rgw_cuobj_rdma_port

After restarting the daemon, check its startup log for a successful pool initialization. With the default settings, the message includes initialized with 128 RDMA buffers of 8388608 bytes. Configuration values alone do not prove that RDMA initialization succeeded.

Use the client’s RDMA mode to verify both transfer directions:

  1. Upload a small object, such as 4 KiB, to a test bucket. Confirm a successful HTTP response, x-amz-rdma-reply: 200, and x-amz-rdma-bytes-transferred: 4096.

  2. Download the object into a registered client buffer. Check the same RDMA headers and compare the downloaded data with the original. The successful HTTP response has no object-data body.

  3. Download a range that fits in the configured buffer. Check HTTP 206 Partial Content, x-amz-rdma-reply: 206, Content-Range, and a transferred-byte count equal to the selected range size. Compare the data at the beginning of the registered destination buffer with the selected object bytes.

  4. Issue a HEAD request. Verify that it returns the object’s content length without an RDMA transfer or RDMA success headers.

  5. Read the uploaded object with an ordinary S3 client and compare its data. This also verifies interoperability with the normal HTTP data path.

A client that cannot expose these headers should provide equivalent transfer status through its cuObject integration. Do not use a hand-written token for these checks: the token must identify memory registered by the client library.

Request and Response Protocol

A cuObject-aware client registers its source or destination memory and sends the descriptor in the x-amz-rdma-token request header. Generate descriptors with the cuObject client API. They refer to live memory registrations and transport resources, so they cannot be replaced by an arbitrary string or reused after the registration has ended. S3 authentication and permissions still apply to the HTTP request.

The DC v1 descriptor has the following colon-separated layout:

addr:size:rkey:reserved:qp_num:lid:gid

The first field is the client memory address and the second is its size in bytes, both encoded as hexadecimal digits without a 0x prefix, sign, or whitespace. For example, a size field of 800000 represents 8 MiB. The remaining fields describe the memory key and RDMA endpoint; pass the complete SDK-generated descriptor unchanged.

PUT and GET use the descriptor as follows:

  • PUT or multipart upload part: The size field specifies the entire payload for this request. The client sends an empty HTTP body, with Content-Length: 0, and keeps the payload in registered memory for RGW to read. A zero descriptor size is rejected; use an ordinary HTTP PUT to create an empty object.

  • GET: The registered destination must have room for the complete object or selected range. RGW determines the transfer length from the S3 response, and writes the response starting at the descriptor’s address. An object range offset does not become an offset into the client buffer.

  • HEAD: RGW returns ordinary HTTP metadata, including the object’s content length, without transferring data over RDMA or returning RDMA success headers.

On successful RDMA PUT or GET, RGW returns these headers:

RDMA response headers

Header

Meaning

x-amz-rdma-reply

The RDMA transfer succeeded: 200 for PUTs and ordinary GETs, or 206 for ranged GETs whose HTTP status is 206 Partial Content.

x-amz-rdma-bytes-transferred

The number of object-data bytes transferred, expressed in decimal.

A successful RDMA GET has an empty HTTP body and Content-Length: 0. Its HTTP status and, for a range, Content-Range still describe the S3 response. An empty-object GET reports zero transferred bytes and needs no RDMA buffer. RGW sends success only after the RDMA operation and normal request processing have completed. Keep the client buffer registered and available throughout the request, and use the client library’s completion and error handling before reusing or releasing it.

Malformed address fields, and malformed or zero PUT size fields, return HTTP 400 InvalidArgument when checked by RGW. Short transfers return HTTP 500. Other SDK, storage, or filter failures also return an error response. Error responses omit the RDMA success headers; a failed GET may have written part of the destination buffer, which must not be treated as a successful object read.

Requests without the token use ordinary HTTP transfers. A GET or PUT that carries an RDMA token while RDMA is disabled, the cuObject library is not installed, or initialization failed returns HTTP 500 rather than silently using the HTTP body. Clients that retry using HTTP must remove the token and, for PUT, send the object data in the HTTP body.

Logs

RGW’s cuObject messages use the rgw_cuobj: prefix and the debug_rgw logging subsystem. Detailed descriptor and buffer messages use level 21. rgw_cuobj_log_level separately controls cuObject library messages on standard error, with values off, error, info, and debug. Its default is error.

For temporary detailed RGW logging on the example daemon:

ceph config set client.rgw.8000 debug_rgw 21/21

Restore the previous logging level after collecting the required output. Changes to rgw_cuobj_log_level require a daemon restart.

Troubleshooting

Common S3 RDMA failures

Symptom

Checks

cuObj RDMA server init failed at startup

Check that libcuobjserver.so.2 can be loaded, the configured RDMA IP, access to RDMA devices, library versions, available memory, and memory-registration limits. RGW continues with RDMA disabled after this failure, and S3 requests carrying an RDMA token return HTTP 500.

No x-amz-rdma-reply header

Check that runtime enablement and startup succeeded, and that the client sent a token. HEAD requests and error responses also omit this header.

HTTP 400 InvalidArgument

Check the SDK-generated descriptor, especially the hexadecimal address and the nonzero size for a PUT. Create empty objects through HTTP.

HTTP 503 ServiceUnavailable

Check the transfer size against rgw_cuobj_buffer_size. If it fits, reduce concurrent requests or provision more buffers within the available memory budget. Increasing the buffer count does not allow larger individual transfers.

HTTP 500 or a short transfer

Check the RGW and cuObject logs, RDMA connectivity, and the lifetime and size of the client memory registration. Storage or filter failures can also cause an error. Treat a partly filled GET buffer as a failed read.

Config Reference

The following settings can be applied through ceph config set as shown above, or in ceph.conf under the [client.rgw.{instance-name}] section. All seven settings take effect when the RGW daemon starts.

rgw_cuobj_num_dcis configures the library’s Dynamic Connection Interfaces at startup; its default is 128. It is separate from the RGW buffer count.

rgw_cuobj_enabled

Enable experimental cuObject RDMA transfers for S3 PUT and GET requests. Requires the cuObject server runtime library and an RDMA interface address. Disabled at runtime by default. See S3 RDMA with cuObject for experimental status, prerequisites, and deployment instructions.

type:

bool

runtime updatable:

false

default:

false

rgw_cuobj_rdma_ip

Local RDMA interface address used by cuObject. This must be set when rgw_cuobj_enabled is enabled. See S3 RDMA with cuObject.

type:

str

runtime updatable:

false

rgw_cuobj_rdma_port

Port used by the cuObject RDMA server, separate from the HTTP frontend port. See S3 RDMA with cuObject for deployment instructions.

type:

uint

runtime updatable:

false

default:

20886

rgw_cuobj_buffer_size

Size of each registered buffer and the maximum RDMA PUT payload or GET response size. Each multipart upload part or GET range must fit in one buffer. See S3 RDMA with cuObject and Memory Sizing and Transfer Limits for memory sizing and transfer limits.

type:

size

runtime updatable:

false

default:

8Mi

see also:

rgw_cuobj_buffer_count

rgw_cuobj_buffer_count

Number of registered buffers shared by RDMA PUT and GET requests. The pool consumes this count multiplied by rgw_cuobj_buffer_size bytes per daemon, plus overhead. See S3 RDMA with cuObject and Memory Sizing and Transfer Limits for memory sizing and transfer limits.

type:

uint

runtime updatable:

false

default:

128

see also:

rgw_cuobj_buffer_size, rgw_thread_pool_size

rgw_cuobj_num_dcis

Number of Dynamic Connection Interfaces configured in the cuObject library at startup. This is separate from the number of RGW buffers. See S3 RDMA with cuObject for deployment instructions.

type:

uint

runtime updatable:

false

default:

128

see also:

rgw_thread_pool_size

rgw_cuobj_log_level

Verbosity of cuObject library messages on standard error. RGW’s own cuObject messages use debug_rgw separately. See S3 RDMA with cuObject for logging and deployment instructions.

type:

str

runtime updatable:

false

default:

error

valid choices:
  • off

  • error

  • info

  • debug

Brought to you by the Ceph Foundation

The Ceph Documentation is a community resource funded and hosted by the non-profit Ceph Foundation. If you would like to support this and our other efforts, please consider joining now.