diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-03-25 15:20:53 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-03-25 15:20:53 +0000 |
commit | 020c88692058131e4009125e00ff5ca2400a2f31 (patch) | |
tree | d098c48bbe49b0c3a1373704bf966ad27c82b7f0 /storage | |
parent | a4f448633278360f7cb8ef2135f68291cb021a9f (diff) |
Add config control over tcpnodelay for c++ too.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/config/stor-communicationmanager.def | 2 | ||||
-rw-r--r-- | storage/src/vespa/storage/storageserver/communicationmanager.cpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/storage/src/vespa/storage/config/stor-communicationmanager.def b/storage/src/vespa/storage/config/stor-communicationmanager.def index 2a2a840dd4e..f05d9eca7e4 100644 --- a/storage/src/vespa/storage/config/stor-communicationmanager.def +++ b/storage/src/vespa/storage/config/stor-communicationmanager.def @@ -33,6 +33,8 @@ mbus.rpctargetcache.ttl double default = 600 ## Any value below 1 will be 1. mbus.num_threads int default=4 +mbus.optimization enum {LATENCY, THROUGHPUT} default = LATENCY + ## Enable to use above thread pool for encoding replies ## False will use network(fnet) thread mbus.dispatch_on_encode bool default=true diff --git a/storage/src/vespa/storage/storageserver/communicationmanager.cpp b/storage/src/vespa/storage/storageserver/communicationmanager.cpp index 978d434847e..78d2c9f9c21 100644 --- a/storage/src/vespa/storage/storageserver/communicationmanager.cpp +++ b/storage/src/vespa/storage/storageserver/communicationmanager.cpp @@ -415,6 +415,7 @@ void CommunicationManager::configure(std::unique_ptr<CommunicationManagerConfig> params.setNumThreads(std::max(1, config->mbus.numThreads)); params.setDispatchOnDecode(config->mbus.dispatchOnDecode); params.setDispatchOnEncode(config->mbus.dispatchOnEncode); + params.setTcpNoDelay(config->mbus.optimization == CommunicationManagerConfig::Mbus::Optimization::LATENCY); params.setIdentity(mbus::Identity(_component.getIdentity())); if (config->mbusport != -1) { |