diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-31 11:55:34 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-31 12:03:55 +0000 |
commit | 3500970a9db4f014b861e2e50e89310da4944b09 (patch) | |
tree | 294588f56c310df0302f1d692be05f0f5b9a5390 /searchlib | |
parent | 67e01bb07fa987c716d284317b40cedea82d8ba8 (diff) |
Since we no longer have a minimum 1G summary file size, we should no longer have 1G initial buffer.
Reducing first allocation to 64M.
Use named literals.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/docstore/compacter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/docstore/compacter.cpp b/searchlib/src/vespa/searchlib/docstore/compacter.cpp index 26fb79f8a4e..3639b0a57d2 100644 --- a/searchlib/src/vespa/searchlib/docstore/compacter.cpp +++ b/searchlib/src/vespa/searchlib/docstore/compacter.cpp @@ -2,6 +2,7 @@ #include "compacter.h" #include "logdatastore.h" +#include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/array.hpp> #include <vespa/log/log.h> @@ -11,6 +12,10 @@ namespace search::docstore { using vespalib::alloc::Alloc; +namespace { + static constexpr size_t INITIAL_BACKING_BUFFER_SIZE = 64_Mi; +} + void Compacter::write(LockGuard guard, uint32_t chunkId, uint32_t lid, const void *buffer, size_t sz) { (void) chunkId; @@ -28,7 +33,7 @@ BucketCompacter::BucketCompacter(size_t maxSignificantBucketBits, const Compress _maxBucketGuardDuration(vespalib::duration::zero()), _lastSample(vespalib::steady_clock::now()), _lock(), - _backingMemory(Alloc::alloc(0x40000000), &_lock), + _backingMemory(Alloc::alloc(INITIAL_BACKING_BUFFER_SIZE), &_lock), _tmpStore(), _lidGuard(ds.getLidReadGuard()), _bucketizerGuard(), |