mirror of
https://github.com/facebook/rocksdb.git
synced 2024-12-04 02:02:41 +00:00
134a52e144
Summary: In https://github.com/facebook/rocksdb/pull/3934 we introduced advisor scripts that make suggestions in the config options based on the log file and stats from a run of rocksdb. The optimizer runs the advisor on a benchmark application in a loop and automatically applies the suggested changes until the config options are optimized. This is a work in progress and the patch is the initial skeleton for the optimizer. The sample application that is run in the loop is currently dbbench. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4169 Reviewed By: maysamyabandeh Differential Revision: D9023671 Pulled By: poojam23 fbshipit-source-id: a6192d475c462cf6eb2b316716f97cb400fcb64d
84 lines
2.7 KiB
INI
84 lines
2.7 KiB
INI
[Rule "stall-too-many-memtables"]
|
|
suggestions=inc-bg-flush:inc-write-buffer
|
|
conditions=stall-too-many-memtables
|
|
|
|
[Condition "stall-too-many-memtables"]
|
|
source=LOG
|
|
regex=Stopping writes because we have \d+ immutable memtables \(waiting for flush\), max_write_buffer_number is set to \d+
|
|
|
|
[Rule "stall-too-many-L0"]
|
|
suggestions=inc-max-subcompactions:inc-max-bg-compactions:inc-write-buffer-size:dec-max-bytes-for-level-base:inc-l0-slowdown-writes-trigger
|
|
conditions=stall-too-many-L0
|
|
|
|
[Condition "stall-too-many-L0"]
|
|
source=LOG
|
|
regex=Stalling writes because we have \d+ level-0 files
|
|
|
|
[Rule "stop-too-many-L0"]
|
|
suggestions=inc-max-bg-compactions:inc-write-buffer-size:inc-l0-stop-writes-trigger
|
|
conditions=stop-too-many-L0
|
|
|
|
[Condition "stop-too-many-L0"]
|
|
source=LOG
|
|
regex=Stopping writes because we have \d+ level-0 files
|
|
|
|
[Rule "stall-too-many-compaction-bytes"]
|
|
suggestions=inc-max-bg-compactions:inc-write-buffer-size:inc-hard-pending-compaction-bytes-limit:inc-soft-pending-compaction-bytes-limit
|
|
conditions=stall-too-many-compaction-bytes
|
|
|
|
[Condition "stall-too-many-compaction-bytes"]
|
|
source=LOG
|
|
regex=Stalling writes because of estimated pending compaction bytes \d+
|
|
|
|
[Suggestion "inc-bg-flush"]
|
|
option=DBOptions.max_background_flushes
|
|
action=increase
|
|
|
|
[Suggestion "inc-write-buffer"]
|
|
option=CFOptions.max_write_buffer_number
|
|
action=increase
|
|
|
|
[Suggestion "inc-max-subcompactions"]
|
|
option=DBOptions.max_subcompactions
|
|
action=increase
|
|
|
|
[Suggestion "inc-max-bg-compactions"]
|
|
option=DBOptions.max_background_compactions
|
|
action=increase
|
|
|
|
[Suggestion "inc-write-buffer-size"]
|
|
option=CFOptions.write_buffer_size
|
|
action=increase
|
|
|
|
[Suggestion "dec-max-bytes-for-level-base"]
|
|
option=CFOptions.max_bytes_for_level_base
|
|
action=decrease
|
|
|
|
[Suggestion "inc-l0-slowdown-writes-trigger"]
|
|
option=CFOptions.level0_slowdown_writes_trigger
|
|
action=increase
|
|
|
|
[Suggestion "inc-l0-stop-writes-trigger"]
|
|
option=CFOptions.level0_stop_writes_trigger
|
|
action=increase
|
|
|
|
[Suggestion "inc-hard-pending-compaction-bytes-limit"]
|
|
option=CFOptions.hard_pending_compaction_bytes_limit
|
|
action=increase
|
|
|
|
[Suggestion "inc-soft-pending-compaction-bytes-limit"]
|
|
option=CFOptions.soft_pending_compaction_bytes_limit
|
|
action=increase
|
|
|
|
[Rule "level0-level1-ratio"]
|
|
conditions=level0-level1-ratio
|
|
suggestions=l0-l1-ratio-health-check
|
|
|
|
[Condition "level0-level1-ratio"]
|
|
source=OPTIONS
|
|
options=CFOptions.level0_file_num_compaction_trigger:CFOptions.write_buffer_size:CFOptions.max_bytes_for_level_base
|
|
evaluate=int(options[0])*int(options[1])-int(options[2])>=-268173312 # should evaluate to a boolean, condition triggered if evaluates to true
|
|
|
|
[Suggestion "l0-l1-ratio-health-check"]
|
|
description='modify options such that (level0_file_num_compaction_trigger * write_buffer_size - max_bytes_for_level_base < -268173312) is satisfied'
|