Merge pull request #6795 from neethuhaneesha/rocksdb-blocksize
Adding rocksdb block size option.
This commit is contained in:
commit
b7096c410f
|
|
@ -388,6 +388,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
|||
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.
|
||||
init( ROCKSDB_BLOCK_SIZE, 32768 ); // 32 KB, size of the block in rocksdb cache.
|
||||
|
||||
// Leader election
|
||||
bool longLeaderElection = randomize && BUGGIFY;
|
||||
|
|
|
|||
|
|
@ -318,6 +318,7 @@ public:
|
|||
int ROCKSDB_CAN_COMMIT_DELAY_ON_OVERLOAD;
|
||||
int ROCKSDB_CAN_COMMIT_DELAY_TIMES_ON_OVERLOAD;
|
||||
int64_t ROCKSDB_COMPACTION_READAHEAD_SIZE;
|
||||
int64_t ROCKSDB_BLOCK_SIZE;
|
||||
|
||||
// Leader election
|
||||
int MAX_NOTIFICATIONS;
|
||||
|
|
|
|||
|
|
@ -294,6 +294,9 @@ rocksdb::ColumnFamilyOptions getCFOptions() {
|
|||
}
|
||||
bbOpts.block_cache = rocksdb_block_cache;
|
||||
}
|
||||
if (SERVER_KNOBS->ROCKSDB_BLOCK_SIZE > 0) {
|
||||
bbOpts.block_size = SERVER_KNOBS->ROCKSDB_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
options.table_factory.reset(rocksdb::NewBlockBasedTableFactory(bbOpts));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue