mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
778e179046
Summary: During compaction, we sync the output files after they are fully written out. This causes unnecessary blocking of the compaction thread and burstiness of the write traffic. This diff simply asks the OS to sync data incrementally as they are written, on the background. The hope is that, at the final sync, most of the data are already on disk and we would block less on the sync call. Thus, each compaction runs faster and we could use fewer number of compaction threads to saturate IO. In addition, the write traffic will be smoothed out, hopefully reducing the IO P99 latency too. Some quick tests show 10~20% improvement in per thread compaction throughput. Combined with posix advice on compaction read, just 5 threads are enough to almost saturate the udb flash bandwidth for 800 bytes write only benchmark. What's more promising is that, with saturated IO, iostat shows average wait time is actually smoother and much smaller. For the write only test 800bytes test: Before the change: await occillate between 10ms and 3ms After the change: await ranges 1-3ms Will test against read-modify-write workload too, see if high read latency P99 could be resolved. Will introduce a parameter to control the sync interval in a follow up diff after cleaning up EnvOptions. Test Plan: make check; db_bench; db_stress Reviewers: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D11115 |
||
---|---|---|
.. | ||
arena.cc | ||
arena.h | ||
arena_test.cc | ||
auto_roll_logger.cc | ||
auto_roll_logger.h | ||
auto_roll_logger_test.cc | ||
bloom.cc | ||
bloom_test.cc | ||
build_version.h | ||
cache.cc | ||
cache_test.cc | ||
coding.cc | ||
coding.h | ||
coding_test.cc | ||
comparator.cc | ||
crc32c.cc | ||
crc32c.h | ||
crc32c_test.cc | ||
env.cc | ||
env_hdfs.cc | ||
env_posix.cc | ||
env_test.cc | ||
filelock_test.cc | ||
filter_policy.cc | ||
hash.cc | ||
hash.h | ||
histogram.cc | ||
histogram.h | ||
histogram_test.cc | ||
ldb_cmd.cc | ||
ldb_cmd.h | ||
ldb_cmd_execute_result.h | ||
ldb_tool.cc | ||
logging.cc | ||
logging.h | ||
murmurhash.cc | ||
murmurhash.h | ||
mutexlock.h | ||
options.cc | ||
posix_logger.h | ||
random.h | ||
signal_test.cc | ||
stack_trace.h | ||
stats_logger.h | ||
status.cc | ||
stop_watch.h | ||
string_util.cc | ||
string_util.h | ||
testharness.cc | ||
testharness.h | ||
testutil.cc | ||
testutil.h |