diff options
author | Geir Storli <geirst@yahooinc.com> | 2021-10-04 10:35:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 10:35:20 +0200 |
commit | 7371274583e76a1b4ba2a0d9ba001048c58d38de (patch) | |
tree | 8a6c61106a0f35f61ab54f5f4972f369fca3eddb | |
parent | 8497bfe680c3c675f8bca1fc9222e7b0571be06c (diff) | |
parent | 3bff5d7c925bcd6dc1de68067c61ff8f9bff847c (diff) |
Merge pull request #19406 from vespa-engine/toregge/add-docstore-tuning-for-vespa-redistribute-bm
Add docstore tuning for vespa-redistribute-bm.
4 files changed, 22 insertions, 0 deletions
diff --git a/searchcore/src/apps/vespa-redistribute-bm/vespa_redistribute_bm.cpp b/searchcore/src/apps/vespa-redistribute-bm/vespa_redistribute_bm.cpp index f35538dcbe1..3fc42e50cdb 100644 --- a/searchcore/src/apps/vespa-redistribute-bm/vespa_redistribute_bm.cpp +++ b/searchcore/src/apps/vespa-redistribute-bm/vespa_redistribute_bm.cpp @@ -369,6 +369,8 @@ App::usage() "[--client-threads threads]\n" "[--distributor-merge-busy-wait distributor-merge-busy-wait]\n" "[--distributor-stripes stripes]\n" + "[--doc-store-chunk-compression-level level]\n" + "[--doc-store-chunk-maxbytes maxbytes]\n" "[--documents documents]\n" "[--flip-nodes flip-nodes]\n" "[--groups groups]\n" @@ -400,6 +402,8 @@ App::get_options() { "client-threads", 1, nullptr, 0 }, { "distributor-merge-busy-wait", 1, nullptr, 0 }, { "distributor-stripes", 1, nullptr, 0 }, + { "doc-store-chunk-compression-level", 1, nullptr, 0 }, + { "doc-store-chunk-maxbytes", 1, nullptr, 0 }, { "documents", 1, nullptr, 0 }, { "flip-nodes", 1, nullptr, 0 }, { "groups", 1, nullptr, 0 }, @@ -425,6 +429,8 @@ App::get_options() LONGOPT_CLIENT_THREADS, LONGOPT_DISTRIBUTOR_MERGE_BUSY_WAIT, LONGOPT_DISTRIBUTOR_STRIPES, + LONGOPT_DOC_STORE_CHUNK_COMPRESSION_LEVEL, + LONGOPT_DOC_STORE_CHUNK_MAXBYTES, LONGOPT_DOCUMENTS, LONGOPT_FLIP_NODES, LONGOPT_GROUPS, @@ -462,6 +468,12 @@ App::get_options() case LONGOPT_DISTRIBUTOR_STRIPES: _bm_params.set_distributor_stripes(atoi(opt_argument)); break; + case LONGOPT_DOC_STORE_CHUNK_COMPRESSION_LEVEL: + _bm_params.set_doc_store_chunk_compression_level(atoi(opt_argument)); + break; + case LONGOPT_DOC_STORE_CHUNK_MAXBYTES: + _bm_params.set_doc_store_chunk_maxbytes(atoi(opt_argument)); + break; case LONGOPT_DOCUMENTS: _bm_params.set_documents(atoi(opt_argument)); break; diff --git a/searchcore/src/vespa/searchcore/bmcluster/bm_cluster_params.cpp b/searchcore/src/vespa/searchcore/bmcluster/bm_cluster_params.cpp index 157c74d49a4..84dc19e388f 100644 --- a/searchcore/src/vespa/searchcore/bmcluster/bm_cluster_params.cpp +++ b/searchcore/src/vespa/searchcore/bmcluster/bm_cluster_params.cpp @@ -9,6 +9,8 @@ BmClusterParams::BmClusterParams() : _bucket_db_stripe_bits(4), _distributor_merge_busy_wait(10), // Same default as stor_distributormanager.def _distributor_stripes(0), + _doc_store_chunk_compression_level(9), // Same default as in proton.def + _doc_store_chunk_maxbytes(65536), // Same default as in proton.def _enable_distributor(false), _enable_service_layer(false), _groups(0), diff --git a/searchcore/src/vespa/searchcore/bmcluster/bm_cluster_params.h b/searchcore/src/vespa/searchcore/bmcluster/bm_cluster_params.h index d4b277609ca..19dac66978d 100644 --- a/searchcore/src/vespa/searchcore/bmcluster/bm_cluster_params.h +++ b/searchcore/src/vespa/searchcore/bmcluster/bm_cluster_params.h @@ -15,6 +15,8 @@ class BmClusterParams uint32_t _bucket_db_stripe_bits; uint32_t _distributor_merge_busy_wait; uint32_t _distributor_stripes; + uint32_t _doc_store_chunk_compression_level; + uint32_t _doc_store_chunk_maxbytes; bool _enable_distributor; bool _enable_service_layer; uint32_t _groups; @@ -42,6 +44,8 @@ public: uint32_t get_bucket_db_stripe_bits() const { return _bucket_db_stripe_bits; } uint32_t get_distributor_merge_busy_wait() const { return _distributor_merge_busy_wait; } uint32_t get_distributor_stripes() const { return _distributor_stripes; } + uint32_t get_doc_store_chunk_compression_level() const noexcept { return _doc_store_chunk_compression_level; } + uint32_t get_doc_store_chunk_maxbytes() const noexcept { return _doc_store_chunk_maxbytes; } bool get_enable_distributor() const { return _enable_distributor; } uint32_t get_groups() const noexcept { return _groups; } const vespalib::string & get_indexing_sequencer() const { return _indexing_sequencer; } @@ -67,6 +71,8 @@ public: void set_bucket_db_stripe_bits(uint32_t value) { _bucket_db_stripe_bits = value; } void set_distributor_merge_busy_wait(uint32_t value) { _distributor_merge_busy_wait = value; } void set_distributor_stripes(uint32_t value) { _distributor_stripes = value; } + void set_doc_store_chunk_compression_level(uint32_t value) { _doc_store_chunk_compression_level = value; } + void set_doc_store_chunk_maxbytes(uint32_t value) { _doc_store_chunk_maxbytes = value; } void set_enable_distributor(bool value) { _enable_distributor = value; } void set_enable_service_layer(bool value) { _enable_service_layer = value; } void set_groups(uint32_t value); diff --git a/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp b/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp index 15683a6a455..571ec592201 100644 --- a/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp +++ b/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp @@ -574,6 +574,8 @@ MyBmNode::create_document_db(const BmClusterParams& params) std::transform(sequencer.begin(), sequencer.end(), sequencer.begin(), [](unsigned char c){ return std::toupper(c); }); protonCfg->indexing.optimize = ProtonConfig::Indexing::getOptimize(sequencer); } + protonCfg->summary.log.chunk.compression.level = params.get_doc_store_chunk_compression_level(); + protonCfg->summary.log.chunk.maxbytes = params.get_doc_store_chunk_maxbytes(); auto bootstrap_config = std::make_shared<BootstrapConfig>(1, _document_types, _repo, |