Skip to content

client: readdir_r_cb: get rstat for dir only if using rbytes for size#46960

Merged
rishabh-d-dave merged 2 commits intoceph:mainfrom
xdavidwu:client-readdir-performance
Jul 13, 2023
Merged

client: readdir_r_cb: get rstat for dir only if using rbytes for size#46960
rishabh-d-dave merged 2 commits intoceph:mainfrom
xdavidwu:client-readdir-performance

Conversation

@xdavidwu
Copy link
Contributor

@xdavidwu xdavidwu commented Jul 5, 2022

When client_dirsize_rbytes is off, there should be no need for getting
rstat on readdir operations.

This fixes performance when client_dirsize_rbytes is off after #38222.

Fixes: https://tracker.ceph.com/issues/61999
Signed-off-by: Pinghao Wu xdavidwuph@gmail.com

Contribution Guidelines

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

@github-actions github-actions bot added the cephfs Ceph File System label Jul 5, 2022
@vshankar vshankar requested a review from a team July 8, 2022 05:04
Copy link
Member

@lxbsz lxbsz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

LGTM. @rishabh-d-dave please pick thi sup in your next test run.

@rishabh-d-dave rishabh-d-dave added needs-qa wip-rishabh-testing Rishabh's testing label labels Jan 31, 2023
@rishabh-d-dave
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave removed needs-qa wip-rishabh-testing Rishabh's testing label labels Mar 31, 2023
@rishabh-d-dave
Copy link
Contributor

@xdavidwu xdavidwu force-pushed the client-readdir-performance branch from 30c8546 to b43e31c Compare April 1, 2023 13:16
@xdavidwu
Copy link
Contributor Author

xdavidwu commented Apr 1, 2023

@rishabh-d-dave Thanks, I think this is ready for another test round.

@vshankar
Copy link
Contributor

vshankar commented Apr 3, 2023

@rishabh-d-dave Thanks, I think this is ready for another test round.

@xdavidwu Could you describe the bug that @rishabh-d-dave found in the test run and the fix? Its becomes helpful to not go over the entire changes again.

@xdavidwu
Copy link
Contributor Author

xdavidwu commented Apr 3, 2023

I think the cause of test failures were that in tests, ceph-fuse get the client_dirsize_rbytes = false via mon, not directly from config, and in previous version, mds-client: make client_dirsize_rbytes unchangeable in runtime, no_mon_update flag was added to client_dirsize_rbytes so it was not possible to set it via mon.

The original intention is to prevent client_dirsize_rbytes being changable at runtime. After some tests I found out that only startup flag is needed for that, not no_mon_update.

In the newer version, no_mon_update on client_dirsize_rbytes is removed.

@vshankar
Copy link
Contributor

vshankar commented Apr 3, 2023

I think the cause of test failures were that in tests, ceph-fuse get the client_dirsize_rbytes = false via mon, not directly from config, and in previous version, mds-client: make client_dirsize_rbytes unchangeable in runtime, no_mon_update flag was added to client_dirsize_rbytes so it was not possible to set it via mon.

Ah! I see client_dirsize_rbytes = False in the test run.

@rishabh-d-dave rishabh-d-dave added needs-qa wip-rishabh-testing Rishabh's testing label labels Apr 5, 2023
@github-actions
Copy link

github-actions bot commented Jun 4, 2023

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

Copy link
Contributor

@rishabh-d-dave rishabh-d-dave left a comment

Choose a reason for hiding this comment

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

xdavidwu added 2 commits July 13, 2023 14:15
When `client_dirsize_rbytes` is off, there should be no need for getting
rstat on readdir operations.

This fixes performance when `client_dirsize_rbytes` is off after ceph#38222.

Fixes: https://tracker.ceph.com/issues/61999
Signed-off-by: Pinghao Wu <xdavidwuph@gmail.com>
kclient also has this option, and is unchangeable unless remounted.
Let's keep parity with kclient.

Signed-off-by: Pinghao Wu <xdavidwuph@gmail.com>
@rishabh-d-dave
Copy link
Contributor

@xdavidwu Hi. The tests ran successfully. This PR is ready for merge. But this patch needs to backported to older version of Ceph and therefore a tracker ticket is required. I've created the tracker ticket for you - https://tracker.ceph.com/issues/61999. You need to refer it in your commit message by adding this line: Fixes: https://tracker.ceph.com/issues/61999. After this is done, I can proceed to merge the PR.

Thank you for the contributing to CephFS. :)

@xdavidwu xdavidwu force-pushed the client-readdir-performance branch from b43e31c to a66e969 Compare July 13, 2023 08:56
@rishabh-d-dave rishabh-d-dave force-pushed the client-readdir-performance branch from a66e969 to 05a48a4 Compare July 13, 2023 08:56
@rishabh-d-dave
Copy link
Contributor

@xdavidwu I've just updated the commit message for you (earlier I couldn't update the PR branch).

@rishabh-d-dave
Copy link
Contributor

rishabh-d-dave commented Jul 13, 2023

@xdavidwu I've just updated the commit message for you (earlier I couldn't update the PR branch).

Oh, on a refresh I see you had done it already. I am sorry about that. Feel free to push again if there's some mistake in branch I've pushed.

Sorry to bother you. This would've been unnecessary if I pushing to your branch was successful earlier.

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

Labels

cephfs Ceph File System common wip-rishabh-testing Rishabh's testing label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants