Merge pull request #6654 from neethuhaneesha/readAheadCompaction
Adding rocksdb compaction readahead size option.
This commit is contained in:
commit
f7ec39c0ee
|
@ -380,6 +380,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
|||
// Set ROCKSDB_CAN_COMMIT_DELAY_TIMES_ON_OVERLOAD to 0, to disable
|
||||
init( ROCKSDB_CAN_COMMIT_DELAY_ON_OVERLOAD, 1 );
|
||||
init( ROCKSDB_CAN_COMMIT_DELAY_TIMES_ON_OVERLOAD, 5 );
|
||||
init( ROCKSDB_COMPACTION_READAHEAD_SIZE, 32768 ); // 32 KB, performs bigger reads when doing compaction.
|
||||
|
||||
// Leader election
|
||||
bool longLeaderElection = randomize && BUGGIFY;
|
||||
|
|
|
@ -307,6 +307,7 @@ public:
|
|||
int64_t ROCKSDB_CAN_COMMIT_COMPACT_BYTES_LIMIT;
|
||||
int ROCKSDB_CAN_COMMIT_DELAY_ON_OVERLOAD;
|
||||
int ROCKSDB_CAN_COMMIT_DELAY_TIMES_ON_OVERLOAD;
|
||||
int64_t ROCKSDB_COMPACTION_READAHEAD_SIZE;
|
||||
|
||||
// Leader election
|
||||
int MAX_NOTIFICATIONS;
|
||||
|
|
|
@ -306,6 +306,9 @@ rocksdb::Options getOptions() {
|
|||
if (SERVER_KNOBS->ROCKSDB_MAX_SUBCOMPACTIONS > 0) {
|
||||
options.max_subcompactions = SERVER_KNOBS->ROCKSDB_MAX_SUBCOMPACTIONS;
|
||||
}
|
||||
if (SERVER_KNOBS->ROCKSDB_COMPACTION_READAHEAD_SIZE > 0) {
|
||||
options.compaction_readahead_size = SERVER_KNOBS->ROCKSDB_COMPACTION_READAHEAD_SIZE;
|
||||
}
|
||||
|
||||
options.statistics = rocksdb::CreateDBStatistics();
|
||||
options.statistics->set_stats_level(rocksdb::kExceptHistogramOrTimers);
|
||||
|
|
Loading…
Reference in New Issue