Change default options.delayed_write_rate

Summary: We now have a mechanism to further slowdown writes. Double default options.delayed_write_rate to try to keep the default behavior closer to it used to be.

Test Plan: Run all tests.

Reviewers: IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: yhchiang, kradhakrishnan, rven, leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D52281
main
sdong 9 years ago
parent b9f77ba12b
commit 15b8902264
  1. 1
      HISTORY.md
  2. 2
      db/db_bench.cc
  3. 2
      include/rocksdb/options.h
  4. 2
      util/options.cc

@ -7,6 +7,7 @@
* If options.max_write_buffer_number > 3, writes will be slowed down when writing to the last write buffer to delay a full stop. * If options.max_write_buffer_number > 3, writes will be slowed down when writing to the last write buffer to delay a full stop.
* Introduce CompactionJobInfo::compaction_reason, this field include the reason to trigger the compaction. * Introduce CompactionJobInfo::compaction_reason, this field include the reason to trigger the compaction.
* After slow down is triggered, if estimated pending compaction bytes keep increasing, slowdown more. * After slow down is triggered, if estimated pending compaction bytes keep increasing, slowdown more.
* Increase default options.delayed_write_rate to 2MB/s.
## 4.3.0 (12/8/2015) ## 4.3.0 (12/8/2015)
### New Features ### New Features

@ -642,7 +642,7 @@ DEFINE_uint64(soft_pending_compaction_bytes_limit, 64ull * 1024 * 1024 * 1024,
DEFINE_uint64(hard_pending_compaction_bytes_limit, 128ull * 1024 * 1024 * 1024, DEFINE_uint64(hard_pending_compaction_bytes_limit, 128ull * 1024 * 1024 * 1024,
"Stop writes if pending compaction bytes exceed this number"); "Stop writes if pending compaction bytes exceed this number");
DEFINE_uint64(delayed_write_rate, 2097152u, DEFINE_uint64(delayed_write_rate, 8388608u,
"Limited bytes allowed to DB when soft_rate_limit or " "Limited bytes allowed to DB when soft_rate_limit or "
"level0_slowdown_writes_trigger triggers"); "level0_slowdown_writes_trigger triggers");

@ -1170,7 +1170,7 @@ struct DBOptions {
// gets behind further. // gets behind further.
// Unit: byte per second. // Unit: byte per second.
// //
// Default: 1MB/s // Default: 2MB/s
uint64_t delayed_write_rate; uint64_t delayed_write_rate;
// If true, then DB::Open() will not update the statistics used to optimize // If true, then DB::Open() will not update the statistics used to optimize

@ -261,7 +261,7 @@ DBOptions::DBOptions()
wal_bytes_per_sync(0), wal_bytes_per_sync(0),
listeners(), listeners(),
enable_thread_tracking(false), enable_thread_tracking(false),
delayed_write_rate(1024U * 1024U), delayed_write_rate(2 * 1024U * 1024U),
skip_stats_update_on_db_open(false), skip_stats_update_on_db_open(false),
wal_recovery_mode(WALRecoveryMode::kTolerateCorruptedTailRecords), wal_recovery_mode(WALRecoveryMode::kTolerateCorruptedTailRecords),
row_cache(nullptr), row_cache(nullptr),

Loading…
Cancel
Save