.. confval:: rgw_enable_gc_threads
+Dedup Settings
+==============
+
+At least one RGW in each zone must have the dedup background thread running
+for dedup operations to function:
+
+.. confval:: rgw_enable_dedup_threads
+
Multisite Settings
==================
one valid name; an empty or all-comment file is rejected.
+Configuration
+=============
+
+The dedup background thread must be enabled on at least one RGW daemon in each
+zone for dedup operations to function. Having the thread enabled on multiple
+RGW processes within the same zone spreads the dedup work between them.
+
+.. confval:: rgw_enable_dedup_threads
+
+This setting is evaluated at RGW startup. Changing it requires a daemon
+restart.
+
+When running RGW as an NFS-Ganesha gateway (librgw), the dedup thread is
+disabled by default. To enable it in NFS mode, also set:
+
+.. confval:: rgw_nfs_run_dedup_threads
+
+
Skipped Objects
===============
- rgw_enable_quota_threads
- rgw_enable_lc_threads
with_legacy: true
+- name: rgw_enable_dedup_threads
+ type: bool
+ level: advanced
+ desc: Enables the dedup background maintenance thread.
+ long_desc: The dedup background maintenance thread is responsible for full object
+ deduplication. The thread itself can be disabled, but in order for dedup to work
+ correctly, at least one RGW in each zone needs to have this thread running. Having
+ the thread enabled on multiple RGW processes within the same zone can spread some
+ of the dedup work between them.
+ default: true
+ services:
+ - rgw
+ see_also:
+ - rgw_enable_gc_threads
+ - rgw_enable_lc_threads
+ - rgw_enable_restore_threads
+ with_legacy: true
- name: rgw_data
type: str
level: advanced
services:
- rgw
with_legacy: true
+- name: rgw_nfs_run_dedup_threads
+ type: bool
+ level: advanced
+ desc: run dedup threads in librgw (default off)
+ default: false
+ services:
+ - rgw
+ with_legacy: true
- name: rgw_nfs_run_sync_thread
type: bool
level: advanced
#ifdef WITH_RADOSGW_RADOS
void rgw::AppMain::init_dedup()
{
+ auto run_dedup =
+ (g_conf()->rgw_enable_dedup_threads &&
+ ((!nfs) || (nfs && g_conf()->rgw_nfs_run_dedup_threads)));
+
+ if (!run_dedup) {
+ return;
+ }
+
rgw::sal::Driver* driver = env.driver;
if (driver->get_name() == "rados") { /* Supported for only RadosStore */
try {