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.
#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(),
