1
0
Fork 0

more options

This commit is contained in:
jsteemann 2017-05-24 11:10:34 +02:00
parent b23285df81
commit 631453a1f3
3 changed files with 9 additions and 0 deletions

View File

@ -258,6 +258,7 @@ void RocksDBEngine::start() {
} else {
table_options.no_block_cache = true;
}
table_options.block_size = opts->_tableBlockSize;
table_options.filter_policy.reset(rocksdb::NewBloomFilterPolicy(10, true));
_options.table_factory.reset(
rocksdb::NewBlockBasedTableFactory(table_options));

View File

@ -32,6 +32,7 @@
#include "RestServer/DatabasePathFeature.h"
#include <rocksdb/options.h>
#include <rocksdb/table.h>
#include <thread>
@ -41,6 +42,7 @@ using namespace arangodb::options;
namespace {
rocksdb::Options rocksDBDefaults;
rocksdb::BlockBasedTableOptions rocksDBTableOptionsDefaults;
}
RocksDBOptionFeature::RocksDBOptionFeature(
@ -64,6 +66,7 @@ RocksDBOptionFeature::RocksDBOptionFeature(
? static_cast<uint64_t>(((TRI_PhysicalMemory - (static_cast<uint64_t>(2) << 30)) * 0.3))
: (256 << 20)),
_blockCacheShardBits(0),
_tableBlockSize(rocksDBTableOptionsDefaults.block_size),
_recycleLogFileNum(rocksDBDefaults.recycle_log_file_num),
_compactionReadaheadSize(rocksDBDefaults.compaction_readahead_size),
_verifyChecksumsInCompaction(
@ -197,6 +200,10 @@ void RocksDBOptionFeature::collectOptions(
options->addOption("--rocksdb.block-cache-shard-bits",
"number of shard bits to use for block cache",
new UInt64Parameter(&_blockCacheShardBits));
options->addOption("--rocksdb.table-block-size",
"approximate size (in bytes) of user data packed per block",
new UInt64Parameter(&_tableBlockSize));
options->addHiddenOption("--rocksdb.recycle-log-file-num",
"number of log files to keep around for recycling",

View File

@ -61,6 +61,7 @@ class RocksDBOptionFeature final
uint64_t _numThreadsLow;
uint64_t _blockCacheSize;
uint64_t _blockCacheShardBits;
uint64_t _tableBlockSize;
uint64_t _recycleLogFileNum;
uint64_t _compactionReadaheadSize;
bool _verifyChecksumsInCompaction;