summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2011-09-01 11:39:59 -0700
committerYehuda Sadeh <yehuda@hq.newdream.net>2011-09-01 11:39:59 -0700
commit4fa62d5e02ca0c065ab9fedeeb7311de4d989324 (patch)
treec8c8976a25165403e67111ebb3b8a3f896ef52ac
parentbcf9cb789440086cedca3848803bf8dbd64e7de0 (diff)
downloadceph-4fa62d5e02ca0c065ab9fedeeb7311de4d989324.tar.gz
rgw: configurable thread pool size
-rw-r--r--src/common/config.cc1
-rw-r--r--src/common/config.h1
-rw-r--r--src/rgw/rgw_main.cc2
3 files changed, 3 insertions, 1 deletions
diff --git a/src/common/config.cc b/src/common/config.cc
index c75e066b51f..c1d99d1412d 100644
--- a/src/common/config.cc
+++ b/src/common/config.cc
@@ -433,6 +433,7 @@ struct config_option config_optionsp[] = {
OPTION(rgw_socket_path, OPT_STR, NULL), // path to unix domain socket, if not specified, rgw will not run as external fcgi
OPTION(rgw_op_thread_timeout, OPT_INT, 10*60),
OPTION(rgw_op_thread_suicide_timeout, OPT_INT, 60*60),
+ OPTION(rgw_thread_pool_size, OPT_INT, 100),
// see config.h
OPTION(internal_safe_to_start_threads, OPT_BOOL, false),
diff --git a/src/common/config.h b/src/common/config.h
index 1d4bfbfc9be..644cc1d6be1 100644
--- a/src/common/config.h
+++ b/src/common/config.h
@@ -567,6 +567,7 @@ public:
string rgw_socket_path;
int rgw_op_thread_timeout;
int rgw_op_thread_suicide_timeout;
+ int rgw_thread_pool_size;
// This will be set to true when it is safe to start threads.
// Once it is true, it will never change.
diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc
index 3a6b833a524..1ab2219e556 100644
--- a/src/rgw/rgw_main.cc
+++ b/src/rgw/rgw_main.cc
@@ -253,7 +253,7 @@ int main(int argc, const char **argv)
return EIO;
}
- RGWProcess process(g_ceph_context, 20);
+ RGWProcess process(g_ceph_context, g_conf->rgw_thread_pool_size);
process.run();