Reduce maximum concurrency to 4 client threads on OpenBSD, to reserve enough file descriptors.
This commit is contained in:
parent
aca4cd3b3f
commit
43b1c6365d
@ -431,7 +431,7 @@ class MultiImplPool {
|
||||
|
||||
auto max_client_threads = clamp(thread::hardware_concurrency(), 8u, 20u) * 5 / 4;
|
||||
#if TD_OPENBSD
|
||||
max_client_threads = td::min(max_client_threads, 7u);
|
||||
max_client_threads = td::min(max_client_threads, 4u);
|
||||
#endif
|
||||
impls_.resize(max_client_threads);
|
||||
CHECK(impls_.size() * (1 + MultiImpl::ADDITIONAL_THREAD_COUNT + 1 /* IOCP */) < 128);
|
||||
|
Loading…
Reference in New Issue
Block a user