Skip to content

[WIP] tool: serviceable ceph-dedup-tool and daemon#53992

Closed
myoungwon wants to merge 21 commits intoceph:mainfrom
myoungwon:wip-ceph-dedup-tool-v2
Closed

[WIP] tool: serviceable ceph-dedup-tool and daemon#53992
myoungwon wants to merge 21 commits intoceph:mainfrom
myoungwon:wip-ceph-dedup-tool-v2

Conversation

@myoungwon
Copy link
Member

@myoungwon myoungwon commented Oct 13, 2023

This PR is the step 1 to make deduplication stable, described in https://docs.google.com/document/d/10esikcvrpTgWipPpIb6JyMhtRuhNtS1Ode3evUFIVwo/edit

The objectives of this PR are:

  1. Deploy ceph daemon container and run ceph-dedup-daemon by Cephadm
  2. Split ceph-dedup-tool and ceph-dedup-daemon
  3. Make ceph-dedup-daemon work correctly as a daemon

The usage example to use dedup is:

  1. ceph-dedup-tool --op enable --pool <POOL> --chunk-pool <POOL>
  2. ceph orch apply dedup <POOL>

To test this PR, it's necessary to rebuild the container image for daemons,
adding this commit to Ceph-container repository (samsungceph/ceph-container@8b3f38c)

Signed-off-by: Myoungwon Oh myoungwon.oh@samsung.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
Copy link

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

@myoungwon myoungwon force-pushed the wip-ceph-dedup-tool-v2 branch 2 times, most recently from d23653c to 8a0ddb2 Compare October 24, 2023 08:24
@myoungwon myoungwon changed the title [WIP, DNM] serviable ceph-dedup-tool [WIP, DNM] serviceable ceph-dedup-tool Oct 24, 2023
@myoungwon myoungwon force-pushed the wip-ceph-dedup-tool-v2 branch 6 times, most recently from 12453ac to 1c98298 Compare October 30, 2023 06:50
@myoungwon myoungwon requested a review from a team as a code owner October 30, 2023 09:51
@myoungwon myoungwon force-pushed the wip-ceph-dedup-tool-v2 branch 3 times, most recently from 9e92cba to 8e6675c Compare November 1, 2023 09:44
@github-actions
Copy link

github-actions bot commented Nov 1, 2023

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

myoungwon and others added 13 commits January 13, 2024 06:16
…nterrupt signal

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
…lt when the daemon runs

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
…common configurations in the rados object

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
To use ceph-dedup, users are required to configure  pool and chunk_pool settings first.
To do so, this commit add the enable op which must be called prior to running
the ceph-dedup-daemon to set pool and chunk_pool correctly.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
set-dedup-conf is to set dedup configuration manually

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
Since the ceph-dedup-daemon exclusively uses set-chunk op,
dedup options in pool_info_t is not necessary.
These options are relevant only when handling tier-flush op.

Plus, this commit include the removal of unused code that is
no longer in use.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
…ted point

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
The existing code unconditionaly waits for the completion of all the
set-chunk operations. Threfore, this commits sends an evict operation
as soon as each of the set-chunk is complete to speed up the entire
dedup procedure in the daemon.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
…tion not to raise exception

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
…nt change

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
@myoungwon myoungwon force-pushed the wip-ceph-dedup-tool-v2 branch from cdc91ae to 8130577 Compare January 15, 2024 02:40
myoungwon and others added 6 commits January 16, 2024 11:29
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
…ake a chunk incorrectly

The caller has to specify the target version when sending set_chunk.
If not, the there is a risk of adding an outdated chunk to the target object
because the object content could have been changed prior to set_chunk.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
…_dedup

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
This commit adds a dedup type in cephadm to enable running or
controlling a dedup daemon container.

Signed-off-by: daegon.yang <daegon.yang@samsung.com>
This commit adds a dedup service to orch, enabling orch to deploy or
execute a dedup daemon through cephadm.

Signed-off-by: daegon.yang <daegon.yang@samsung.com>
This commit implements service logic in orch to interpret and create
the dedup service when dedup service apply command received.

Signed-off-by: daegon.yang <daegon.yang@samsung.com>
@myoungwon myoungwon force-pushed the wip-ceph-dedup-tool-v2 branch from 8130577 to f1f4f46 Compare January 17, 2024 00:34
@myoungwon
Copy link
Member Author

@github-actions
Copy link

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

Copy link
Contributor

@athanatos athanatos left a comment

Choose a reason for hiding this comment

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

I think some of this is probably useful. @benhanokh may want to use this as a guide for how to create background dedup daemons.

As for this PR specifically, it's not clear to me that it's worth investing the resources either for you or for a reviewer to refine it enough to merge it at this time. The current dedup implementation won't scale to most use cases for reasons we've discussed, and PR reviews for it tend to be very time consuming as they tend to need quite a bit of work to merge. It seems like we might want to keep this in a branch until there's been work on a more scalable architecture -- it should be pretty easy to rebase later.

I'll leave it up to @benhanokh to evaluate whether it seems more sensible to refine this PR in order to pick up the cephadm and package integration now or leave it in a branch to adapt later.

Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
%description -n ceph-dedup
Daemon for selective deduplication, targeting a Ceph pool.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure whether we actually want a package for this. It's certainly not mature enough for usage in a real cluster, and we do not want to mislead users.

'rgw': '/usr/bin/radosgw',
'rbd-mirror': '/usr/bin/rbd-mirror',
'cephfs-mirror': '/usr/bin/cephfs-mirror',
'dedup': '/usr/bin/ceph-dedup-daemon',
Copy link
Contributor

Choose a reason for hiding this comment

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

This part doesn't seem to have any testing yet, right?

default: 5
services:
- ceph-dedup
- name: fingerprint_algorithm
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be determined by the pool options?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same question for a bunch of these.

(",d", "run in foreground, log to stderr")
(",f", "run in foreground, log to usual location")
("debug_ms", po::value<std::string>(), "set message debug level (e.g. 1)")
("run-once", ": do a single iteration for debug")
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you're adding support for a normal ceph-style config, use the normal ceph argument parsing as well so that you don't have to duplicate a bunch of these options between the config declaration and here.

@github-actions
Copy link

github-actions bot commented May 6, 2024

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.

@github-actions github-actions bot added the stale label May 6, 2024
@github-actions
Copy link

github-actions bot commented Jun 5, 2024

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions bot closed this Jun 5, 2024
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