diff options
author | Tor Brede Vekterli <vekterli@vespa.ai> | 2023-10-31 15:30:31 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@vespa.ai> | 2023-11-02 11:17:24 +0000 |
commit | 10abf9db2a47091e151ca903e3675fae29c4ed09 (patch) | |
tree | b10feaaf88b3e5acd09dba87ed723a19befa9a31 /searchcore | |
parent | c87ae9ba1b1f1745191e75edefcaf436af3ab0c6 (diff) |
Wire HwInfo into MergeThrottler and use for auto-deduction of memory limits
Add config for min/max capping of deduced limit, as well as a scaling
factor based on the memory available to the process. Defaults
have been chosen based on empirical observations over many years,
but having these as config means we can tune things live if
it should ever be required.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/apps/proton/proton.cpp | 12 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/searchcore/src/apps/proton/proton.cpp b/searchcore/src/apps/proton/proton.cpp index 129091606b3..4c20c40b406 100644 --- a/searchcore/src/apps/proton/proton.cpp +++ b/searchcore/src/apps/proton/proton.cpp @@ -109,7 +109,8 @@ class ProtonServiceLayerProcess : public storage::ServiceLayerProcess { public: ProtonServiceLayerProcess(const config::ConfigUri & configUri, proton::Proton & proton, FNET_Transport& transport, - const vespalib::string& file_distributor_connection_spec); + const vespalib::string& file_distributor_connection_spec, + const vespalib::HwInfo& hw_info); ~ProtonServiceLayerProcess() override { shutdown(); } void shutdown() override; @@ -130,8 +131,9 @@ public: ProtonServiceLayerProcess::ProtonServiceLayerProcess(const config::ConfigUri & configUri, proton::Proton & proton, FNET_Transport& transport, - const vespalib::string& file_distributor_connection_spec) - : ServiceLayerProcess(configUri), + const vespalib::string& file_distributor_connection_spec, + const vespalib::HwInfo& hw_info) + : ServiceLayerProcess(configUri, hw_info), _proton(proton), _transport(transport), _file_distributor_connection_spec(file_distributor_connection_spec), @@ -259,18 +261,18 @@ App::startAndRun(FNET_Transport & transport, int argc, char **argv) { proton.init(configSnapshot); } vespalib::string file_distributor_connection_spec = configSnapshot->getFiledistributorrpcConfig().connectionspec; - configSnapshot.reset(); std::unique_ptr<ProtonServiceLayerProcess> spiProton; if ( ! params.serviceidentity.empty()) { spiProton = std::make_unique<ProtonServiceLayerProcess>(identityUri.createWithNewId(params.serviceidentity), proton, transport, - file_distributor_connection_spec); + file_distributor_connection_spec, configSnapshot->getHwInfo()); spiProton->setupConfig(subscribeTimeout); spiProton->createNode(); EV_STARTED("servicelayer"); } else { proton.getMetricManager().init(identityUri); } + configSnapshot.reset(); EV_STARTED("proton"); while (!(SIG::INT.check() || SIG::TERM.check() || (spiProton && spiProton->getNode().attemptedStopped()))) { std::this_thread::sleep_for(1000ms); diff --git a/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp b/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp index 9a0a2968c69..808747034ac 100644 --- a/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp +++ b/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp @@ -243,7 +243,7 @@ public: MyServiceLayerProcess::MyServiceLayerProcess(const config::ConfigUri& configUri, PersistenceProvider& provider, std::unique_ptr<storage::IStorageChainBuilder> chain_builder) - : ServiceLayerProcess(configUri), + : ServiceLayerProcess(configUri, vespalib::HwInfo()), _provider(provider) { if (chain_builder) { |