summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-01-31 13:56:14 +0100
committerGitHub <noreply@github.com>2022-01-31 13:56:14 +0100
commit85d369a9a198eb444ff91312799c0f8819cadafb (patch)
tree93eb4b96488ff740f8a63d081813c809ff5a16f7
parentbd05e78a364b6f1d0a4f5ba8088e1ec1ee02a463 (diff)
parent3500970a9db4f014b861e2e50e89310da4944b09 (diff)
Merge pull request #20993 from vespa-engine/balder/reduce-initial-buffersize-from-1g-to-64m
Since we no longer have a minimum 1G summary file size, we should no …
-rw-r--r--searchlib/src/vespa/searchlib/docstore/compacter.cpp7
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(),