Skip to content

crimson/os/seastore: add checksum offload to RBM - #57782

Merged
cyx1231st merged 7 commits into
ceph:mainfrom
myoungwon:wip-nvme-pi
Jul 23, 2024
Merged

cyx1231st merged 7 commits into
ceph:mainfrom
myoungwon:wip-nvme-pi

Conversation

@myoungwon

@myoungwon myoungwon commented May 30, 2024 •

Copy link
Copy Markdown
Member

The goal of this PR is to introduce checksum offload by using end to end data protection specified by NVMe spec.

Reference: https://nvmexpress.org/specification/nvm-command-set-specification/
https://en.wikipedia.org/wiki/Data_Integrity_Field

Signed-off-by: Myoungwon Oh [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@myoungwon
myoungwon requested a review from a team as a code owner May 30, 2024 03:48
@myoungwon
myoungwon removed the request for review from a team May 30, 2024 03:49
@myoungwon
myoungwon marked this pull request as draft May 30, 2024 03:52
@myoungwon
myoungwon force-pushed the wip-nvme-pi branch 9 times, most recently from 1f1f526 to b31a461 Compare June 17, 2024 03:41
@myoungwon
myoungwon marked this pull request as ready for review June 17, 2024 03:42
Comment thread src/common/options/crimson.yaml.in Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
desc: use nvme device's internal checksum feature without using sever CPU
desc: use NVME device's internal checksum feature without using server CPU

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks. Will do.

@myoungwon

myoungwon commented Jun 17, 2024 •

Copy link
Copy Markdown
Member Author

@cyx1231st Before continuing development on this further, I'd like to hear your thoughts on this to make sure I'm on the right track.

This PR introduces end-to-end-protection (I will also call this the checksum offload, also note that end-to-end-protection contains the checksum offload) functionality, also known as Protect information specified in NVMe spec, provided by modern NVMe devices (please refer to section 8.3 and Figure 452-(c) in https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf).
To use this feature, application is required to follow a preparation step by invokingformat nvmcommand first to format device's namespace to use the checksum offload---device will allocate additional space for checksum. Then, application needs to send a nvme I/O command to the device with special flags (PRCHK and PRACT) to perform read/write operations.

We have tested this under Samsung NVMe device (PM1743) and Kioxia (KCM61RUL3T84), both of which are based on NVMe Spec 1.4.

Please note that end-to-end-data-protection functionality contains a various types of modes as explained in Figure 452.

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some initial comments.

Comment thread src/common/options/crimson.yaml.in Resolved
Comment thread src/crimson/os/seastore/cache.cc Resolved
@cyx1231st

Copy link
Copy Markdown
Member

(unrelated, random thoughts)
BTW, it might be interesting to see how the performance can differ using the same (SLC) SSD under RBM vs Segmented.

@myoungwon

Copy link
Copy Markdown
Member Author

@cyx1231st I will update the most recent number soon. Please note that RBM shows 4 K IOPS and Segment shows 3.5 K IOPS under random 4K write workload (RBD, 1 core). This result was measured two month ago.

@myoungwon
myoungwon force-pushed the wip-nvme-pi branch 6 times, most recently from 58a025c to 399a307 Compare June 21, 2024 03:42
@myoungwon

Copy link
Copy Markdown
Member Author

@cyx1231st Can you check if I addressed your comments correctly?

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The direction generally looks good to me.

Comment thread src/crimson/os/seastore/cached_extent.h Resolved
Comment thread src/crimson/os/seastore/cached_extent.h Resolved
Comment thread src/crimson/os/seastore/cache.cc Resolved
Comment thread src/crimson/os/seastore/journal.h Resolved
@myoungwon
myoungwon force-pushed the wip-nvme-pi branch 2 times, most recently from dbfe866 to 6e65698 Compare July 18, 2024 09:33
@myoungwon

Copy link
Copy Markdown
Member Author

jenkins test make check

@cyx1231st

Copy link
Copy Markdown
Member

How this PR may impact the end performance using RBM (with vs without crc offloading) ?

#57782 (comment)

I assume 4K IOPS RBM performance didn't include this PR?

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't have further concerns. CC @athanatos @xxhdx1985126

@myoungwon

Copy link
Copy Markdown
Member Author

How this PR may impact the end performance using RBM (with vs without crc offloading) ?

#57782 (comment)

I assume 4K IOPS RBM performance didn't include this PR?

Right. the performance result didn't include this PR. I'll re-check the performance number.

@myoungwon

Copy link
Copy Markdown
Member Author

@cyx1231st I'm trying to figure out why the number is lower than the previous result.
Anyway, I added a brief result as below; please consider the number as a reference. I'll continue measuring performance to figure out why fluctuations occurs and why the number is low.

  • RBD workload (1 core, 4 K random, filled image)
  1. Segment: 2850 IOPS
  2. RBM (with this PR and delta overwrite): 3600 IOPS
  • RBD workload (1 core, 4 K random, without filled)
  1. Segment: 3180 IOPS
  2. RBM (with this PR): 3280 IOPS

@cyx1231st

Copy link
Copy Markdown
Member

@myoungwon how is the results with this PR and seastore_disable_end_to_end_data_protection set to true? That might be useful.

@myoungwon

myoungwon commented Jul 19, 2024 •

Copy link
Copy Markdown
Member Author

@myoungwon how is the results with this PR and seastore_disable_end_to_end_data_protection set to true? That might be useful.

There is no difference. However, in 64K random write workload (no filled), the result with PR shows a 10 % improvement (2515 vs 2782). It seems like checksum offload affects the performance more positively when the extent is relatively large (because this PR only affects fresh extents, not mutated extents).

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@cyx1231st

Copy link
Copy Markdown
Member

A rebase is needed^

myoungwon and others added 7 commits July 22, 2024 02:01
… to end data protection is enabled

Signed-off-by: Myoungwon Oh <[email protected]>
Current codes allow the device to allocate multiple namespace without specific policy
if the nvme device report that it is capable of mutistream functionality.
So, this commit removes the multistream related code, leaving it as a TODO.

Signed-off-by: Myoungwon Oh <[email protected]>
…e supports the checksum offload

Signed-off-by: Myoungwon Oh <[email protected]>
@cyx1231st

Copy link
Copy Markdown
Member

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants