summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-02-04 22:12:33 +0100
committerGitHub <noreply@github.com>2019-02-04 22:12:33 +0100
commitd540f06eace1a1e45e8e581060a6e9c12b7ec9d6 (patch)
tree8928c53e5297c2bdf3ac2b4c513fc3620b593f50
parent37b36dd78171de06da81dd460eb2084bd197a7ff (diff)
parentff110ce6c1ac2272596a0d80a437d522571a7374 (diff)
Merge pull request #8375 from vespa-engine/balder/aloocate-enough-threads
Balder/aloocate enough threads MERGEOK
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index ecfca857bd5..3542fcc3716 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -95,11 +95,16 @@ deriveCompactionCompressionThreads(const ProtonConfig &proton,
// We need at least 1 guaranteed free worker in order to ensure progress so #documentsdbs + 1 should suffice,
// but we will not be cheap and give it one extra.
- return std::max(scaledCores, proton.documentdb.size() + 1 + 1);
+ return std::max(scaledCores, proton.documentdb.size() + proton.flush.maxconcurrent + 1);
}
const vespalib::string CUSTOM_COMPONENT_API_PATH = "/state/v1/custom/component";
+VESPA_THREAD_STACK_TAG(proton_shared_executor)
+VESPA_THREAD_STACK_TAG(index_warmup_executor)
+VESPA_THREAD_STACK_TAG(initialize_executor)
+VESPA_THREAD_STACK_TAG(close_executor)
+
}
Proton::ProtonFileHeaderContext::ProtonFileHeaderContext(const Proton &proton_, const vespalib::string &creator)
@@ -287,13 +292,13 @@ Proton::init(const BootstrapConfig::SP & configSnapshot)
protonConfig.visit.ignoremaxbytes);
vespalib::string fileConfigId;
- _warmupExecutor = std::make_unique<vespalib::ThreadStackExecutor>(4, 128*1024);
+ _warmupExecutor = std::make_unique<vespalib::ThreadStackExecutor>(4, 128*1024, index_warmup_executor);
const size_t sharedThreads = deriveCompactionCompressionThreads(protonConfig, hwInfo.cpu());
- _sharedExecutor = std::make_unique<vespalib::BlockingThreadStackExecutor>(sharedThreads, 128*1024, sharedThreads*16);
+ _sharedExecutor = std::make_unique<vespalib::BlockingThreadStackExecutor>(sharedThreads, 128*1024, sharedThreads*16, proton_shared_executor);
InitializeThreads initializeThreads;
if (protonConfig.initialize.threads > 0) {
- initializeThreads = std::make_shared<vespalib::ThreadStackExecutor>(protonConfig.initialize.threads, 128 * 1024);
+ initializeThreads = std::make_shared<vespalib::ThreadStackExecutor>(protonConfig.initialize.threads, 128 * 1024, initialize_executor);
_initDocumentDbsInSequence = (protonConfig.initialize.threads == 1);
}
_protonConfigurer.applyInitialConfig(initializeThreads);
@@ -434,7 +439,7 @@ Proton::~Proton()
_fs4Server->shutDown();
}
size_t numCores = _protonConfigurer.getActiveConfigSnapshot()->getBootstrapConfig()->getHwInfo().cpu().cores();
- vespalib::ThreadStackExecutor closePool(std::min(_documentDBMap.size(), numCores), 0x20000);
+ vespalib::ThreadStackExecutor closePool(std::min(_documentDBMap.size(), numCores), 0x20000, close_executor);
closeDocumentDBs(closePool);
_documentDBMap.clear();
_persistenceEngine.reset();