Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions YCSB/rocksdb/rocksdb.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rocksdb.dbname=/tmp/ycc
rocksdb.nvm_path=/pg_wal/ycc/memory_art
rocksdb.dbname=/mnt/walsm/tmp/tmp_data/db_test_art
rocksdb.nvm_path=/mnt/walsm/node_memory
rocksdb.format=single
rocksdb.destroy=false

Expand All @@ -24,4 +24,5 @@ rocksdb.compressed_cache_size=0
rocksdb.bloom_bits=0

rocksdb.increase_parallelism=true
rocksdb.optimize_level_style_compaction=true
# rocksdb.optimize_level_style_compaction=true
rocksdb.optimize_universal_style_compaction=true
6 changes: 6 additions & 0 deletions YCSB/rocksdb/rocksdb_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ namespace {
const std::string PROP_OPTIMIZE_LEVELCOMP = "rocksdb.optimize_level_style_compaction";
const std::string PROP_OPTIMIZE_LEVELCOMP_DEFAULT = "false";

const std::string PROP_OPTIMIZE_UNIVERSALCOMP = "rocksdb.optimize_universal_style_compaction";
const std::string PROP_OPTIMIZE_UNIVERSALCOMP_DEFAULT = "false";

const std::string PROP_OPTIONS_FILE = "rocksdb.optionsfile";
const std::string PROP_OPTIONS_FILE_DEFAULT = "";

Expand Down Expand Up @@ -357,6 +360,9 @@ void RocksdbDB::GetOptions(const utils::Properties &props, rocksdb::Options *opt
if (props.GetProperty(PROP_OPTIMIZE_LEVELCOMP, PROP_OPTIMIZE_LEVELCOMP_DEFAULT) == "true") {
opt->OptimizeLevelStyleCompaction();
}
if (props.GetProperty(PROP_OPTIMIZE_UNIVERSALCOMP, PROP_OPTIMIZE_UNIVERSALCOMP_DEFAULT) == "true") {
opt->OptimizeUniversalStyleCompaction();
}
}
}

Expand Down
5 changes: 2 additions & 3 deletions db/art/clf_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ struct RangeRatePair {
}
};

bool RangeRatePairLessorComparor(const RangeRatePair& pair_1, const RangeRatePair& pair_2) {
inline bool RangeRatePairLessorComparor(const RangeRatePair& pair_1, const RangeRatePair& pair_2) {
return pair_1.rate_in_segment < pair_2.rate_in_segment;
}


bool RangeRatePairGreatorComparor(const RangeRatePair& pair_1, const RangeRatePair& pair_2) {
inline bool RangeRatePairGreatorComparor(const RangeRatePair& pair_1, const RangeRatePair& pair_2) {
return pair_1.rate_in_segment > pair_2.rate_in_segment;
}

Expand Down
5 changes: 3 additions & 2 deletions examples/simple_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ void ParseOptions(Options& options) {
options.use_direct_io_for_flush_and_compaction = true;
options.use_direct_reads = true;
options.enable_pipelined_write = true;
options.OptimizeLevelStyleCompaction();
// options.OptimizeLevelStyleCompaction();
options.OptimizeUniversalStyleCompaction();

std::ifstream option_file("options.txt", std::ios::in);
std::string line;
Expand Down Expand Up @@ -425,7 +426,7 @@ void DoTest(std::string test_name) {
options.use_direct_reads = true;
options.enable_pipelined_write = true;
options.compression = rocksdb::kNoCompression;
options.nvm_path = "/pg_wal/ycc/memory_art";
options.nvm_path = "/mnt/walsm/node_memory";
options.IncreaseParallelism(16);

std::string db_path = "/tmp/tmp_data/db_test_" + test_name;
Expand Down