yugabyte/yugabyte-db

[DocDB] Add flag for configuring rocksdb bytes_per_sync option

Open

#10,822 创建于 2021年12月9日

在 GitHub 查看
 (2 评论) (0 反应) (1 负责人)C (1,003 fork)batch import
area/docdbgood first issuekind/enhancementpriority/medium

仓库指标

Star
 (8,229 star)
PR 合并指标
 (平均合并 17天 21小时) (30 天内合并 92 个 PR)

描述

Jira Link: DB-590

Description

  // Allows OS to incrementally sync files to disk while they are being
  // written, in the background. Issue one request for every bytes_per_sync
  // written. 0 turns it off.
  // Default: 0
  uint64_t bytes_per_sync = 0;
DBOptions SanitizeOptions(const std::string& dbname, const DBOptions& src) {
...
  if (result.rate_limiter.get() != nullptr) {
    if (result.bytes_per_sync == 0) {
      result.bytes_per_sync = 1024 * 1024;
    }
  }
...

Currently, we don't set bytes_per_sync explicitly, but we use a rate limiter, so it leads to sync every 1MB (independently for each file) at rocksdb level.

贡献者指南