From 1d78cdb86ddb8eb050d2f7cd97c82974b854ca90 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 30 May 2024 14:45:11 +0200 Subject: Use a smaller thread pool for network operations when doing oplog import to reduce risk NIC/router failure (#89) Medium worker pool now uses a minimum of 2 threads (up from 1) --- src/zenutil/workerpools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/zenutil/workerpools.cpp') diff --git a/src/zenutil/workerpools.cpp b/src/zenutil/workerpools.cpp index 939f3a1c4..144ef6817 100644 --- a/src/zenutil/workerpools.cpp +++ b/src/zenutil/workerpools.cpp @@ -12,7 +12,7 @@ ZEN_THIRD_PARTY_INCLUDES_END namespace zen { namespace { const int LargeWorkerThreadPoolTreadCount = gsl::narrow(std::thread::hardware_concurrency()); - const int MediumWorkerThreadPoolTreadCount = gsl::narrow(Max((std::thread::hardware_concurrency() / 4u), 1u)); + const int MediumWorkerThreadPoolTreadCount = gsl::narrow(Max((std::thread::hardware_concurrency() / 4u), 2u)); const int SmallWorkerThreadPoolTreadCount = gsl::narrow(Max((std::thread::hardware_concurrency() / 8u), 1u)); static bool IsShutDown = false; -- cgit v1.2.3