tikv/tikv

Enable rate-bytes-per-sec option by default

Open

#6484 opened on Jan 17, 2020

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Rust (15,922 stars) (2,189 forks)batch import
component/rocksdbcomponent/titandifficulty/mediumhelp wantedsig/engine

Description

Enabling rate-bytes-per-sec would keep rocksdb background compaction steadily runs, smoothing both IO and CPU usage. However few of our users are using the option. Since ansible runs fio test by default, we can use the result to set an initial default value for rate-bytes-per-sec, if user didn't set it.

To be more specific, we can run fio write only with threads = default max-background-jobs, and use the throughput as upper bound. Then we can maybe set rate-bytes-per-sec to 90% of the upper bound. Other suggestions are welcome.

Currently only kvdb respect rate-bytes-per-sec. We should also make raftdb respect it too.

Task breakdown:

  • Make raftdb respect rate-bytes-per-sec
  • Update ansible to set default value for rate-bytes-per-sec
  • benchmark to show what would be a good default rate-bytes-per-sec

Contributor guide