]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Increase the default number of RGW bucket shards
authorMark Nelson <mnelson@redhat.com>
Fri, 11 Oct 2019 22:50:07 +0000 (17:50 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 27 Feb 2020 20:12:22 +0000 (15:12 -0500)
Signed-off-by: Mark Nelson <mnelson@redhat.com>
Modified-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_zone.h

index f5c055130109b5f20b5c0001f8198ff1762de33b..1837b4f4f7d65bac575757a2ba4c55d36d4ac6a4 100644 (file)
@@ -565,11 +565,18 @@ struct RGWZone {
  */
   uint32_t bucket_index_max_shards;
 
+  // pre-shard buckets on creation to enable some write-parallism by default,
+  // delay the need to reshard as the bucket grows, and (in multisite) get some
+  // bucket index sharding where dynamic resharding is not supported
+  static constexpr uint32_t default_bucket_index_max_shards = 11;
+
   bool sync_from_all;
   set<std::string> sync_from; /* list of zones to sync from */
 
-  RGWZone() : log_meta(false), log_data(false), read_only(false), bucket_index_max_shards(0),
-              sync_from_all(true) {}
+  RGWZone()
+    : log_meta(false), log_data(false), read_only(false),
+      bucket_index_max_shards(default_bucket_index_max_shards),
+      sync_from_all(true) {}
 
   void encode(bufferlist& bl) const {
     ENCODE_START(7, 1, bl);