Change readahead size

This commit is contained in:
Andrea Cavalli 2021-05-29 01:45:03 +02:00
parent 6eb531e4f1
commit ccf07f4216
2 changed files with 3 additions and 3 deletions

View File

@ -1589,7 +1589,7 @@ public class LLLocalDictionary implements LLDictionary {
// readOpts.setIgnoreRangeDeletions(true);
readOpts.setFillCache(false);
//readOpts.setReadaheadSize(2 * 1024 * 1024);
readOpts.setReadaheadSize(32 * 1024); // 32KiB
try (CappedWriteBatch writeBatch = new CappedWriteBatch(db,
CAPPED_WRITE_BATCH_CAP,
RESERVED_WRITE_BATCH_SIZE,
@ -1835,7 +1835,7 @@ public class LLLocalDictionary implements LLDictionary {
private long exactSizeAll(@Nullable LLSnapshot snapshot) {
var readOpts = resolveSnapshot(snapshot);
readOpts.setFillCache(false);
//readOpts.setReadaheadSize(2 * 1024 * 1024);
readOpts.setReadaheadSize(32 * 1024); // 32KiB
readOpts.setVerifyChecksums(VERIFY_CHECKSUMS_WHEN_NOT_NEEDED);
if (PARALLEL_EXACT_SIZE) {

View File

@ -46,7 +46,7 @@ public class LLLocalKeyPrefixReactiveRocksIterator {
.generate(() -> {
var readOptions = new ReadOptions(this.readOptions);
if (!range.hasMin() || !range.hasMax()) {
//readOptions.setReadaheadSize(2 * 1024 * 1024);
readOptions.setReadaheadSize(32 * 1024); // 32KiB
readOptions.setFillCache(canFillCache);
}
return LLLocalDictionary.getRocksIterator(readOptions, range.retain(), db, cfh);