Automatic wal ttls and sync sizes

This commit is contained in:
Andrea Cavalli 2022-05-01 17:25:22 +02:00
parent f63b70ab9d
commit 87d000968a

View File

@ -869,12 +869,12 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
// HIGH MEMORY // HIGH MEMORY
options options
//.setDbWriteBufferSize(64 * SizeUnit.MB) //.setDbWriteBufferSize(64 * SizeUnit.MB)
.setBytesPerSync(64 * SizeUnit.KB) .setBytesPerSync(0)
.setWalBytesPerSync(64 * SizeUnit.KB) .setWalBytesPerSync(0)
.setWalTtlSeconds(30) // flush wal after 30 seconds .setWalTtlSeconds(0) // Auto
.setWalSizeLimitMB(1024) // 1024MB .setWalSizeLimitMB(0) // Auto
.setMaxTotalWalSize(2L * SizeUnit.GB) // 2GiB max wal directory size .setMaxTotalWalSize(0) // Auto
; ;
// DO NOT USE ClockCache! IT'S BROKEN! // DO NOT USE ClockCache! IT'S BROKEN!
blockCache = new LRUCache(writeBufferManagerSize + databaseOptions.blockCache().orElse( 512 * SizeUnit.MB)); blockCache = new LRUCache(writeBufferManagerSize + databaseOptions.blockCache().orElse( 512 * SizeUnit.MB));