@@ -6,20 +6,20 @@ RGW Dynamic Bucket Index Resharding
66
77.. versionadded :: Luminous
88
9- A large bucket index can lead to performance problems, which can
10- be addressed by sharding bucket indexes.
11- Until Luminous, changing the number of bucket shards (resharding)
12- needed to be done offline, with RGW services disabled.
13- Since the Luminous release Ceph has supported online bucket resharding.
9+ A bucket index object with too many entries can lead to performance
10+ problems. This can be addressed by resharding bucket indexes. Until
11+ Luminous, changing the number of bucket shards (resharding) could only
12+ be done offline, with RGW services disabled. Since the Luminous
13+ release Ceph has supported online bucket resharding.
1414
1515Each bucket index shard can handle its entries efficiently up until
16- reaching a certain threshold. If this threshold is
17- exceeded the system can suffer from performance issues. The dynamic
18- resharding feature detects this situation and automatically increases
19- the number of shards used by a bucket's index, resulting in a
20- reduction of the number of entries in each shard. This
21- process is transparent to the user. Writes to the target bucket
22- are blocked ( but reads are not) briefly during resharding process .
16+ reaching a certain threshold number . If this threshold is exceeded the
17+ system can suffer from performance issues. The dynamic resharding
18+ feature detects this situation and automatically increases the number
19+ of shards used by a bucket's index, resulting in a reduction of the
20+ number of entries in each shard. This process is transparent to the
21+ user. Writes to the target bucket can be blocked briefly during
22+ resharding process, but reads are not.
2323
2424By default dynamic bucket index resharding can only increase the
2525number of bucket index shards to 1999, although this upper-bound is a
@@ -29,10 +29,16 @@ spread the number of entries across the bucket index
2929shards more evenly.
3030
3131Detection of resharding opportunities runs as a background process
32- that periodically
33- scans all buckets. A bucket that requires resharding is added to
34- a queue. A thread runs in the background and processes the queueued
35- resharding tasks, one at a time and in order.
32+ that periodically scans all buckets. A bucket that requires resharding
33+ is added to a queue. A thread runs in the background and processes the
34+ queueued resharding tasks one at a time.
35+
36+ Starting with Tentacle, dynamic resharding has the ability to reduce
37+ the number of shards. Once the condition allowing reduction is noted,
38+ there is a time delay before it will actually be executed, in case the
39+ number of objects increases in the near future. The goal of the delay
40+ is to avoid thrashing where resharding keeps getting re-invoked on
41+ buckets that fluctuate in numbers of objects.
3642
3743Multisite
3844=========
@@ -48,6 +54,8 @@ Configuration
4854.. confval :: rgw_dynamic_resharding
4955.. confval :: rgw_max_objs_per_shard
5056.. confval :: rgw_max_dynamic_shards
57+ .. confval :: rgw_dynamic_resharding_may_reduce
58+ .. confval :: rgw_dynamic_resharding_reduction_wait
5159.. confval :: rgw_reshard_bucket_lock_duration
5260.. confval :: rgw_reshard_thread_interval
5361.. confval :: rgw_reshard_num_logs
@@ -136,7 +144,7 @@ For example, the output at each dynamic resharding stage is shown below:
136144Cancel pending bucket resharding
137145--------------------------------
138146
139- Note: Bucket resharding operations cannot be cancelled while executing. ::
147+ Note: Bucket resharding tasks cannot be cancelled once they start executing. ::
140148
141149 # radosgw-admin reshard cancel --bucket <bucket_name>
142150
@@ -158,6 +166,20 @@ since the former is prime. A variety of web sites have lists of prime
158166numbers; search for "list of prime numbers" with your favorite
159167search engine to locate some web sites.
160168
169+ Setting a bucket's minimum number of shards
170+ -------------------------------------------
171+
172+ ::
173+
174+ # radosgw-admin bucket set-min-shards --bucket <bucket_name> --num-shards <min number of shards>
175+
176+ Since dynamic resharding can now reduce the number of shards,
177+ administrators may want to prevent the number of shards from becoming
178+ too low, for example if the expect the number of objects to increase
179+ in the future. This command allows administrators to set a per-bucket
180+ minimum. This does not, however, prevent administrators from manually
181+ resharding to a lower number of shards.
182+
161183Troubleshooting
162184===============
163185
0 commit comments