Permalink
Browse files

do not compress L0, L1, L2 for rocksdb

  • Loading branch information...
mdcallag committed May 23, 2015
1 parent aa467b1 commit 3934e4b7483887dfa7e1e79666a3d976a24cf5ad
Showing with 12 additions and 0 deletions.
  1. +12 −0 wrappers/couch_rocksdb.cc
View
@@ -100,6 +100,18 @@ couchstore_error_t couchstore_open_db_ex(const char *filename,
ppdb->options->target_file_size_base = 1024 * 1024 * 32;
ppdb->options->level_compaction_dynamic_level_bytes = 1;
ppdb->options->stats_dump_period_sec = 60;
+ ppdb->options->hard_rate_limit = 3.0;
+ ppdb->options->soft_rate_limit = 2.5;
+
+ if (ppdb->options->compression != rocksdb::kNoCompression) {
+ ppdb->options->compression_per_level.resize(ppdb->options->num_levels);
+ for (int i = 0; i < ppdb->options->num_levels; ++i) {
+ if (i <= 2)
+ ppdb->options->compression_per_level[i] = rocksdb::kNoCompression;
+ else
+ ppdb->options->compression_per_level[i] = ppdb->options->compression;
+ }
+ }
if (optimize_for_load)
ppdb->options->memtable_factory.reset(new rocksdb::VectorRepFactory);

0 comments on commit 3934e4b

Please sign in to comment.