summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2021-12-15 11:48:32 +0100
committerGitHub <noreply@github.com>2021-12-15 11:48:32 +0100
commit5a5bf0c58c1ac4fda29a365362220728b57763d0 (patch)
tree785e0e69cb1de976b13eee6dc2fbc3bbdd6a240d
parent93510e7705a94af9f86e5bfa88b79f58631c44e2 (diff)
parente3855bf8efa0a1f31ab7c74fae28ab4523cc55b6 (diff)
Merge pull request #20522 from vespa-engine/toregge/extend-proton-config-for-compaction
Extend proton config for controlling how many buffers to compact at
-rw-r--r--searchcore/src/vespa/searchcore/config/proton.def9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp2
2 files changed, 10 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def
index 30f0081a8f0..7e99c1a19aa 100644
--- a/searchcore/src/vespa/searchcore/config/proton.def
+++ b/searchcore/src/vespa/searchcore/config/proton.def
@@ -321,6 +321,15 @@ documentdb[].allocation.max_dead_bytes_ratio double default=0.05
## The ratio of used address space that can be dead before attempting to perform compaction.
documentdb[].allocation.max_dead_address_space_ratio double default=0.2
+## Upper bound for number of buffers that can be compacted at the same time in
+## a data store for a specific reason (e.g. memory used, address space used).
+documentdb[].allocation.max_compact_buffers int default=1
+
+## Ratio of active buffers that can be compacted at the same time in a data
+## store for a specific reason (e.g. memory used, address space used).
+## Effective limit is ceil(active_buffers * active_buffers_ratio).
+documentdb[].allocation.active_buffers_ratio double default=0.1
+
## The interval of when periodic tasks should be run
periodic.interval double default=3600.0
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index 2eb6b1b92f0..06132803414 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -264,7 +264,7 @@ build_alloc_config(const ProtonConfig& proton_config, const vespalib::string& do
auto& alloc_config = document_db_config_entry.allocation;
auto& distribution_config = proton_config.distribution;
search::GrowStrategy grow_strategy(alloc_config.initialnumdocs, alloc_config.growfactor, alloc_config.growbias, alloc_config.multivaluegrowfactor);
- CompactionStrategy compaction_strategy(alloc_config.maxDeadBytesRatio, alloc_config.maxDeadAddressSpaceRatio);
+ CompactionStrategy compaction_strategy(alloc_config.maxDeadBytesRatio, alloc_config.maxDeadAddressSpaceRatio, alloc_config.maxCompactBuffers, alloc_config.activeBuffersRatio);
return std::make_shared<const AllocConfig>
(AllocStrategy(grow_strategy, compaction_strategy, alloc_config.amortizecount),
distribution_config.redundancy, distribution_config.searchablecopies);