Skip to content

Commit 4f277aa

Browse files
author
yicheng
committed
Ensure pool always has at least one thread
Signed-off-by: yicheng <[email protected]>
1 parent 9f86f38 commit 4f277aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ray/common/ray_config_def.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,8 @@ RAY_CONFIG(int64_t,
908908
/// reply path is light enough that 2 threads is sufficient.
909909
RAY_CONFIG(int64_t,
910910
core_worker_num_server_call_thread,
911-
std::min<int64_t>(2, (int64_t)std::thread::hardware_concurrency()))
911+
std::min((int64_t)2,
912+
std::max((int64_t)1, (int64_t)(std::thread::hardware_concurrency() / 4U))))
912913

913914
/// Use madvise to prevent worker/raylet coredumps from including
914915
/// the mapped plasma pages.

0 commit comments

Comments
 (0)