]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ShardedTP: The config option changed
authorSomnath Roy <somnath.roy@sandisk.com>
Tue, 10 Jun 2014 23:02:52 +0000 (16:02 -0700)
committerSomnath Roy <somnath.roy@sandisk.com>
Tue, 10 Jun 2014 23:02:52 +0000 (16:02 -0700)
The config option for sharded threadpool is changed to
osd_op_num_threads_per_shard instead of osd_op_num_sharded_pool_threads.
Along with osd_op_num_shards this will be much more user friendly while
configuring the number of op threads for the osd.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
src/common/config_opts.h
src/osd/OSD.cc

index 8d28e8a9a42d15070dc540b78bc6b8c2541f9200..d3e912c9374fae872ab312130da3284cca561ce2 100644 (file)
@@ -466,7 +466,7 @@ OPTION(osd_op_pq_min_cost, OPT_U64, 65536)
 OPTION(osd_disk_threads, OPT_INT, 1)
 OPTION(osd_recovery_threads, OPT_INT, 1)
 OPTION(osd_recover_clone_overlap, OPT_BOOL, true)   // preserve clone_overlap during recovery/migration
-OPTION(osd_op_num_sharded_pool_threads, OPT_INT, 10)
+OPTION(osd_op_num_threads_per_shard, OPT_INT, 2)
 OPTION(osd_op_num_shards, OPT_INT, 5)
 
 // Only use clone_overlap for recovery if there are fewer than
index 185b66716a90d1e1b6867f0e455a81e304cab8ad..fa51c89936fa0642a16faa994d433d38f20a1595 100644 (file)
@@ -923,7 +923,8 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
   osd_compat(get_osd_compat_set()),
   state_lock(), state(STATE_INITIALIZING),
   op_tp(cct, "OSD::op_tp", cct->_conf->osd_op_threads, "osd_op_threads"),
-  op_sharded_tp(cct, "OSD::op_sharded_tp", cct->_conf->osd_op_num_sharded_pool_threads),
+  op_sharded_tp(cct, "OSD::op_sharded_tp", 
+    cct->_conf->osd_op_num_threads_per_shard * cct->_conf->osd_op_num_shards),
   recovery_tp(cct, "OSD::recovery_tp", cct->_conf->osd_recovery_threads, "osd_recovery_threads"),
   disk_tp(cct, "OSD::disk_tp", cct->_conf->osd_disk_threads, "osd_disk_threads"),
   command_tp(cct, "OSD::command_tp", 1),
@@ -967,7 +968,6 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
   next_removal_seq(0),
   service(this)
 {
-  assert(cct->_conf->osd_op_num_sharded_pool_threads >= cct->_conf->osd_op_num_shards);
   monc->set_messenger(client_messenger);
   op_tracker.set_complaint_and_threshold(cct->_conf->osd_op_complaint_time,
                                          cct->_conf->osd_op_log_threshold);