mirror of https://gitee.com/bigwinds/arangodb
more options
This commit is contained in:
parent
b23285df81
commit
631453a1f3
|
@ -258,6 +258,7 @@ void RocksDBEngine::start() {
|
||||||
} else {
|
} else {
|
||||||
table_options.no_block_cache = true;
|
table_options.no_block_cache = true;
|
||||||
}
|
}
|
||||||
|
table_options.block_size = opts->_tableBlockSize;
|
||||||
table_options.filter_policy.reset(rocksdb::NewBloomFilterPolicy(10, true));
|
table_options.filter_policy.reset(rocksdb::NewBloomFilterPolicy(10, true));
|
||||||
_options.table_factory.reset(
|
_options.table_factory.reset(
|
||||||
rocksdb::NewBlockBasedTableFactory(table_options));
|
rocksdb::NewBlockBasedTableFactory(table_options));
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "RestServer/DatabasePathFeature.h"
|
#include "RestServer/DatabasePathFeature.h"
|
||||||
|
|
||||||
#include <rocksdb/options.h>
|
#include <rocksdb/options.h>
|
||||||
|
#include <rocksdb/table.h>
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@ using namespace arangodb::options;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
rocksdb::Options rocksDBDefaults;
|
rocksdb::Options rocksDBDefaults;
|
||||||
|
rocksdb::BlockBasedTableOptions rocksDBTableOptionsDefaults;
|
||||||
}
|
}
|
||||||
|
|
||||||
RocksDBOptionFeature::RocksDBOptionFeature(
|
RocksDBOptionFeature::RocksDBOptionFeature(
|
||||||
|
@ -64,6 +66,7 @@ RocksDBOptionFeature::RocksDBOptionFeature(
|
||||||
? static_cast<uint64_t>(((TRI_PhysicalMemory - (static_cast<uint64_t>(2) << 30)) * 0.3))
|
? static_cast<uint64_t>(((TRI_PhysicalMemory - (static_cast<uint64_t>(2) << 30)) * 0.3))
|
||||||
: (256 << 20)),
|
: (256 << 20)),
|
||||||
_blockCacheShardBits(0),
|
_blockCacheShardBits(0),
|
||||||
|
_tableBlockSize(rocksDBTableOptionsDefaults.block_size),
|
||||||
_recycleLogFileNum(rocksDBDefaults.recycle_log_file_num),
|
_recycleLogFileNum(rocksDBDefaults.recycle_log_file_num),
|
||||||
_compactionReadaheadSize(rocksDBDefaults.compaction_readahead_size),
|
_compactionReadaheadSize(rocksDBDefaults.compaction_readahead_size),
|
||||||
_verifyChecksumsInCompaction(
|
_verifyChecksumsInCompaction(
|
||||||
|
@ -197,6 +200,10 @@ void RocksDBOptionFeature::collectOptions(
|
||||||
options->addOption("--rocksdb.block-cache-shard-bits",
|
options->addOption("--rocksdb.block-cache-shard-bits",
|
||||||
"number of shard bits to use for block cache",
|
"number of shard bits to use for block cache",
|
||||||
new UInt64Parameter(&_blockCacheShardBits));
|
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",
|
options->addHiddenOption("--rocksdb.recycle-log-file-num",
|
||||||
"number of log files to keep around for recycling",
|
"number of log files to keep around for recycling",
|
||||||
|
|
|
@ -61,6 +61,7 @@ class RocksDBOptionFeature final
|
||||||
uint64_t _numThreadsLow;
|
uint64_t _numThreadsLow;
|
||||||
uint64_t _blockCacheSize;
|
uint64_t _blockCacheSize;
|
||||||
uint64_t _blockCacheShardBits;
|
uint64_t _blockCacheShardBits;
|
||||||
|
uint64_t _tableBlockSize;
|
||||||
uint64_t _recycleLogFileNum;
|
uint64_t _recycleLogFileNum;
|
||||||
uint64_t _compactionReadaheadSize;
|
uint64_t _compactionReadaheadSize;
|
||||||
bool _verifyChecksumsInCompaction;
|
bool _verifyChecksumsInCompaction;
|
||||||
|
|
Loading…
Reference in New Issue