Skip to content

Conversation

@Annmool
Copy link

@Annmool Annmool commented Jan 6, 2026

Fix #1638
Problem: The NVMe-oF transport layer and RBD block device layer were both computing CRC32C checksums on the same data, wasting CPU cycles.

Solution

Config-Driven Optimization (server.py)

Modified _initialize_rbd_crc32c() method to read a new config option: skip_rbd_crc_if_transport_digest
When enabled, this flag disables RBD-side CRC32C computation entirely
The logic respects explicit rbd_with_crc32c settings but allows the skip flag to override them for safety
Added informative logging so operators know when the optimization is active

Configuration Option (ceph-nvmeof.conf)

Added skip_rbd_crc_if_transport_digest = True/False option under the [spdk] section
Included safety warnings in comments explaining when to enable (trusted stacks only, no data transformations)

Result: Operators can now eliminate redundant CRC32C recomputation by setting one config flag, reducing CPU overhead on write-heavy workloads while maintaining safety through explicit opt-in and clear warnings.

- Add skip_rbd_crc_if_transport_digest config option to disable redundant RBD CRC computation
- Implement config-driven logic in GatewayServer._initialize_rbd_crc32c()
- Add unit tests validating all config scenarios

Signed-off-by: Annmool <aydv.267@gmail.com>
@Annmool Annmool force-pushed the double-computation-problem branch from ead43c9 to dd5e8e7 Compare January 6, 2026 06:33

effective_rbd_crc = bool(rbd_with_crc32c)
if skip_if_transport_digest:
effective_rbd_crc = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be adding a new config option (skip_rbd_crc_if_transport_digest) whose sole purpose is to override the existing config option (rbd_with_crc32c) in case it's set to true. Is there anything that is preventing the operator from manipulating rbd_with_crc32c option directly?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't understand what is the idea of this PR given that #1429 is handling the same issue exactly and is already merged.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@idryomov You make a valid point. Looking at the current behavior, rbd_with_crc32c already defaults to False, so operators who want to skip RBD CRC computation can simply leave it unset or explicitly set it to False. The new skip_rbd_crc_if_transport_digest option is somewhat redundant from a functional perspective.

what we can do is

  • Remove the new skip_rbd_crc_if_transport_digest option
  • Just rely on rbd_with_crc32c = False (already the default)
  • Update documentation to clarify: operators who understand the optimization can disable RBD CRC by not enabling it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caroav i have raised the PR because i found that in one of the issue and i was not aware about the #1429 , sorry for the redundancy.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok so I guess it need to be closed right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

Double Computation Problem

3 participants