1
0
Fork 0

added --rocksdb.num-uncompressed-levels

This commit is contained in:
Frank Celler 2017-05-29 11:47:03 +02:00
parent a48f7915e5
commit 4b61f5b8bb
4 changed files with 12 additions and 2 deletions

View File

@ -1,6 +1,8 @@
devel
-----
* added --rocksdb.num-uncompressed-levels to adjust number of non-compressed levels
* added checks for memory managment and warn (i. e. if hugepages are enabled)
* set default SSL cipher suite string to "HIGH:!EXPORT:!aNULL@STRENGTH"

View File

@ -226,9 +226,11 @@ void RocksDBEngine::start() {
// only compress levels >= 2
_options.compression_per_level.resize(_options.num_levels);
for (int level = 0; level < _options.num_levels; ++level) {
_options.compression_per_level[level] = ((level >= 2) ? rocksdb::kSnappyCompression : rocksdb::kNoCompression);
_options.compression_per_level[level] =
(((uint64_t) level >= opts->_numUncompressedLevels) ? rocksdb::kSnappyCompression
: rocksdb::kNoCompression);
}
// TODO: try out the effects of these options
// Number of files to trigger level-0 compaction. A value <0 means that
// level-0 compaction will not be triggered by number of files at all.

View File

@ -54,6 +54,7 @@ RocksDBOptionFeature::RocksDBOptionFeature(
_minWriteBufferNumberToMerge(
rocksDBDefaults.min_write_buffer_number_to_merge),
_numLevels(rocksDBDefaults.num_levels),
_numUncompressedLevels(2),
_maxBytesForLevelBase(rocksDBDefaults.max_bytes_for_level_base),
_maxBytesForLevelMultiplier(
rocksDBDefaults.max_bytes_for_level_multiplier),
@ -128,6 +129,10 @@ void RocksDBOptionFeature::collectOptions(
"number of levels for the database",
new UInt64Parameter(&_numLevels));
options->addOption("--rocksdb.num-uncompressed-levels",
"number of uncompressed levels for the database",
new UInt64Parameter(&_numUncompressedLevels));
options->addHiddenOption("--rocksdb.max-bytes-for-level-base",
"control maximum total data size for level-1",
new UInt64Parameter(&_maxBytesForLevelBase));

View File

@ -52,6 +52,7 @@ class RocksDBOptionFeature final
uint64_t _delayedWriteRate;
uint64_t _minWriteBufferNumberToMerge;
uint64_t _numLevels;
uint64_t _numUncompressedLevels;
uint64_t _maxBytesForLevelBase;
double _maxBytesForLevelMultiplier;
uint64_t _baseBackgroundCompactions;