diff options
| author | Dan Engelbrecht <[email protected]> | 2024-05-30 14:45:11 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-05-30 14:45:11 +0200 |
| commit | 1d78cdb86ddb8eb050d2f7cd97c82974b854ca90 (patch) | |
| tree | 6cefc5d2908f9ed49225844ca4d9982a7e6bec6e /src/zenutil/workerpools.cpp | |
| parent | cache optimizations (#88) (diff) | |
| download | zen-1d78cdb86ddb8eb050d2f7cd97c82974b854ca90.tar.xz zen-1d78cdb86ddb8eb050d2f7cd97c82974b854ca90.zip | |
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)
Diffstat (limited to 'src/zenutil/workerpools.cpp')
| -rw-r--r-- | src/zenutil/workerpools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<int>(std::thread::hardware_concurrency()); - const int MediumWorkerThreadPoolTreadCount = gsl::narrow<int>(Max((std::thread::hardware_concurrency() / 4u), 1u)); + const int MediumWorkerThreadPoolTreadCount = gsl::narrow<int>(Max((std::thread::hardware_concurrency() / 4u), 2u)); const int SmallWorkerThreadPoolTreadCount = gsl::narrow<int>(Max((std::thread::hardware_concurrency() / 8u), 1u)); static bool IsShutDown = false; |