diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-07-02 07:37:01 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-07-02 07:37:01 +0000 |
commit | 33a30b2c11e7857ff5c29344a9c90cd260843e5d (patch) | |
tree | ac0d43afc25ff5701e9c596bab25d42a1f83c7cf /storage | |
parent | 644e1e158f842e858a557871d58414b01e335b9b (diff) |
Support multiple network threads in mbus.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/config/stor-communicationmanager.def | 5 | ||||
-rw-r--r-- | storage/src/vespa/storage/storageserver/communicationmanager.cpp | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/storage/src/vespa/storage/config/stor-communicationmanager.def b/storage/src/vespa/storage/config/stor-communicationmanager.def index 799490ba114..534be7cb6fe 100644 --- a/storage/src/vespa/storage/config/stor-communicationmanager.def +++ b/storage/src/vespa/storage/config/stor-communicationmanager.def @@ -29,7 +29,10 @@ mbus.compress.type enum {NONE, LZ4, ZSTD} default=LZ4 restart ## TTL for rpc target cache mbus.rpctargetcache.ttl double default = 600 restart -## Number of threads for mbus threadpool +## Number of threads for network. +mbus.num_network_threads int default=1 + +## Number of workers threads for messagebus ## Any value below 1 will be 1. mbus.num_threads int default=4 restart diff --git a/storage/src/vespa/storage/storageserver/communicationmanager.cpp b/storage/src/vespa/storage/storageserver/communicationmanager.cpp index 25942926155..39f058d1085 100644 --- a/storage/src/vespa/storage/storageserver/communicationmanager.cpp +++ b/storage/src/vespa/storage/storageserver/communicationmanager.cpp @@ -17,14 +17,11 @@ #include <vespa/storageapi/message/state.h> #include <vespa/storageframework/generic/clock/timer.h> #include <vespa/vespalib/stllike/asciistream.h> -#include <vespa/vespalib/stllike/hash_map.hpp> #include <vespa/vespalib/util/stringfmt.h> - -#include <vespa/log/bufferedlogger.h> #include <vespa/document/bucket/fixed_bucket_spaces.h> -#include <vespa/documentapi/messagebus/messages/getdocumentreply.h> #include <string_view> +#include <vespa/log/bufferedlogger.h> LOG_SETUP(".communication.manager"); using vespalib::make_string; @@ -396,6 +393,7 @@ void CommunicationManager::configure(std::unique_ptr<CommunicationManagerConfig> mbus::RPCNetworkParams params(_configUri); params.setConnectionExpireSecs(config->mbus.rpctargetcache.ttl); params.setNumThreads(std::max(1, config->mbus.numThreads)); + params.setNumNetworkThreads(std::max(1, config->mbus.numNetworkThreads)); params.setDispatchOnDecode(config->mbus.dispatchOnDecode); params.setDispatchOnEncode(config->mbus.dispatchOnEncode); params.setTcpNoDelay(config->mbus.optimizeFor == CommunicationManagerConfig::Mbus::OptimizeFor::LATENCY); |