]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
radosgw-admin: lower default thread pool size
authorCasey Bodley <cbodley@redhat.com>
Wed, 26 Feb 2025 21:06:14 +0000 (16:06 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 26 Feb 2025 21:06:16 +0000 (16:06 -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>
src/rgw/radosgw-admin/radosgw-admin.cc

index 991f9779f0d069693979669492dda02a26957e3e..eb6cbfad9f59c659c75d64fd9129c12dc52f1e42 100644 (file)
@@ -3493,7 +3493,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);