diff options
author | Tor Egge <Tor.Egge@online.no> | 2021-12-15 10:44:54 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2021-12-15 10:44:54 +0100 |
commit | e3855bf8efa0a1f31ab7c74fae28ab4523cc55b6 (patch) | |
tree | d211403c6be99b18408f8cb26e1c9250ca751e59 /searchcore | |
parent | 4f4feea7dc41252589f14f88d7d0e4e0b107eee1 (diff) |
Extend proton config for controlling how many buffers to compact at
the same time.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/config/proton.def | 9 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp | 2 |
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); |