diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-10-20 10:44:42 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-10-20 10:44:42 +0000 |
commit | e986edb8657563c34b28a28e46af1841e9819679 (patch) | |
tree | bba37eff009eeb4159ec3585a0b756028943c8ef | |
parent | 30a86bc16d6582a6fa9cb34a225e49869613d48c (diff) |
Take number of response threads and number of network threads into account.
3 files changed, 9 insertions, 1 deletions
diff --git a/configdefinitions/src/vespa/stor-filestor.def b/configdefinitions/src/vespa/stor-filestor.def index 8ac372c0575..bf1b4294b5b 100644 --- a/configdefinitions/src/vespa/stor-filestor.def +++ b/configdefinitions/src/vespa/stor-filestor.def @@ -31,6 +31,11 @@ num_threads int default=8 restart ## Negative number will choose a good number based on # cores. num_response_threads int default=2 restart +## Number of handler objects that might be created by networkthreads +## This is a temporary setting that only skilled vespa developers should modify +## This must be kept in line with stor-communicationmanager:rpc.num_network_threads +num_network_threads int default=1 restart + ## Type of sequenced thread executor use for persistence replies. response_sequencer_type enum {LATENCY, THROUGHPUT, ADAPTIVE} default=ADAPTIVE restart diff --git a/storage/src/vespa/storage/config/stor-communicationmanager.def b/storage/src/vespa/storage/config/stor-communicationmanager.def index cabb8516153..3511899728d 100644 --- a/storage/src/vespa/storage/config/stor-communicationmanager.def +++ b/storage/src/vespa/storage/config/stor-communicationmanager.def @@ -68,6 +68,8 @@ rpc.num_network_threads int default=1 ## The bucket id associated with a message is used to select the RPC target. ## This ensures the same RPC target is used for all messages to the same bucket to the same node, ## and the RPC target itself handles sequencing of these messages. +## NB !! It is vital that this number is kept in sync with stor-filestor:num_network_threads. +## Only skilled vespa core devolpers should touch this. rpc.num_targets_per_node int default=1 # Minimum size of packets to compress (0 means no compression) diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp index 34e8f599f8f..dd0a933af26 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp @@ -155,7 +155,8 @@ FileStorManager::configure(std::unique_ptr<vespa::config::content::StorFilestorC _config = std::move(config); size_t numThreads = _config->numThreads; size_t numStripes = std::max(size_t(1u), numThreads / 2); - _metrics->initDiskMetrics(1, _component.getLoadTypes()->getMetricLoadTypes(), numStripes, numThreads); + _metrics->initDiskMetrics(1, _component.getLoadTypes()->getMetricLoadTypes(), numStripes, + numThreads + config->numResponseThreads + config->numNetworkThreads); _filestorHandler = std::make_unique<FileStorHandlerImpl>(numThreads, numStripes, *this, *_metrics, _compReg); uint32_t numResponseThreads = computeNumResponseThreads(_config->numResponseThreads); |