Skip to content

Commit 831b364

Browse files
committed
Unpin threadpool core counts
1 parent 7722ebb commit 831b364

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cpp/arcticdb/async/task_scheduler.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ class TaskScheduler {
179179
using CPUSchedulerType = folly::FutureExecutor<folly::CPUThreadPoolExecutor>;
180180
using IOSchedulerType = folly::FutureExecutor<folly::IOThreadPoolExecutor>;
181181

182-
explicit TaskScheduler(ARCTICDB_UNUSED const std::optional<size_t>& cpu_thread_count = std::nullopt, ARCTICDB_UNUSED const std::optional<size_t>& io_thread_count = std::nullopt) :
182+
explicit TaskScheduler(const std::optional<size_t>& cpu_thread_count = std::nullopt, const std::optional<size_t>& io_thread_count = std::nullopt) :
183183
cgroup_folder_("/sys/fs/cgroup"),
184-
cpu_thread_count_(1),
185-
io_thread_count_(1),
184+
cpu_thread_count_(cpu_thread_count ? *cpu_thread_count : ConfigsMap::instance()->get_int("VersionStore.NumCPUThreads", get_default_num_cpus(cgroup_folder_))),
185+
io_thread_count_(io_thread_count ? *io_thread_count : ConfigsMap::instance()->get_int("VersionStore.NumIOThreads", (int) (cpu_thread_count_ * 1.5))),
186186
cpu_exec_(cpu_thread_count_, std::make_shared<InstrumentedNamedFactory>("CPUPool")) ,
187187
io_exec_(io_thread_count_, std::make_shared<InstrumentedNamedFactory>("IOPool")){
188188
util::check(cpu_thread_count_ > 0 && io_thread_count_ > 0, "Zero IO or CPU threads: {} {}", io_thread_count_, cpu_thread_count_);

cpp/arcticdb/processing/clause.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,8 @@ struct ConcatClause {
679679
ARCTICDB_MOVE_COPY_DEFAULT(ConcatClause)
680680

681681
[[nodiscard]] std::vector<std::vector<size_t>> structure_for_processing(ARCTICDB_UNUSED std::vector<RangesAndKey>& ranges_and_keys) {
682+
// TODO: This isn't a long term requirement, for simplicity at the moment we force all input symbols through their own
683+
// processing pipeline right now, even if they have no clauses
682684
internal::raise<ErrorCode::E_ASSERTION_FAILURE>("ConcatClause should never be first in the pipeline");
683685
}
684686

0 commit comments

Comments
 (0)