]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw-admin: lower default thread pool size 62155/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 26 Feb 2025 21:06:14 +0000 (16:06 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 6 Mar 2025 15:29:58 +0000 (10:29 -0500)
the thread pool controlled by rgw_thread_pool_size was added to
radosgw-admin for squid, but the default value of 512 wastes a lot of
time starting/stopping threads. change the default value to 8 for
radosgw-admin commands only

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 357f12f074d8fa9a8bb68f67ae17fa9b42938115)

src/rgw/rgw_admin.cc

index 7bdd0544899ac3ea6a8fc03ebc10ab40e3933727..efbb9f96478cb626317411e1e41627ffe9b5f85a 100644 (file)
@@ -3355,7 +3355,12 @@ int main(int argc, const char **argv)
     exit(0);
   }
 
-  auto cct = rgw_global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT,
+  // alternative defaults for radosgw-admin
+  map<std::string,std::string> defaults = {
+    { "rgw_thread_pool_size", "8" },
+  };
+
+  auto cct = rgw_global_init(&defaults, args, CEPH_ENTITY_TYPE_CLIENT,
                             CODE_ENVIRONMENT_UTILITY, 0);
   ceph::async::io_context_pool context_pool(cct->_conf->rgw_thread_pool_size);