mirror of
https://github.com/ceph/ceph
synced 2025-01-31 23:44:10 +00:00
crimson: make the number of alien threads configurable.
It's particularly important for reads to have large-enough thread pool in `AlienStore` as they are synchronous; that is, e.g. `BlueStore` blocks on IO when handling reads. This commit introduces a configurable allowing operators to increase the number from `1` which we were limited to before the change. Naming similarity with `osd_op_num_threads_per_shard` is intentional. Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
parent
72cc819b3a
commit
387834bae9
@ -5519,6 +5519,11 @@ std::vector<Option> get_global_options() {
|
||||
.set_default(0)
|
||||
.set_description("The maximum number concurrent IO operations, 0 for unlimited"),
|
||||
|
||||
Option("crimson_alien_op_num_threads", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(16)
|
||||
.set_flag(Option::FLAG_STARTUP)
|
||||
.set_description("The number of threads for serving alienized ObjectStore"),
|
||||
|
||||
// ----------------------------
|
||||
// blk specific options
|
||||
Option("bdev_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
|
||||
|
@ -71,7 +71,9 @@ AlienStore::AlienStore(const std::string& path, const ConfigValues& values)
|
||||
logger().error("{}: unable to get nproc: {}", __func__, errno);
|
||||
cpu_id = -1;
|
||||
}
|
||||
tp = std::make_unique<crimson::os::ThreadPool>(1, 128, cpu_id);
|
||||
const auto num_threads =
|
||||
cct->_conf.get_val<uint64_t>("crimson_alien_op_num_threads");
|
||||
tp = std::make_unique<crimson::os::ThreadPool>(num_threads, 128, cpu_id);
|
||||
}
|
||||
|
||||
seastar::future<> AlienStore::start()
|
||||
|
Loading…
Reference in New Issue
Block a user