-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raftstore: increase region size from 64M to 96M #1449
Changes from 2 commits
f915700
b1b99dc
66105ac
bba132d
3879ee8
e06396f
7687fcd
2939d31
0c2b83f
5b406a4
ea66564
a452f7b
7ea42b7
d6409d0
17c73ce
14b18a6
6f35f5a
4375e0d
a1919fd
e905241
223be09
7b5a809
e9c3299
8d57f4a
6b567d6
0e0893a
9203d25
0487fd8
461d55c
c84ba3c
34aa04e
2c7aadd
c0c9cca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -412,14 +412,14 @@ fn build_cfg(matches: &Matches, config: &toml::Value, cluster_id: u64, addr: Str | |
cfg.raft_store.region_split_size = | ||
get_toml_int(config, | ||
"raftstore.region-split-size", | ||
Some(64 * 1024 * 1024)) as u64; | ||
Some(96 * 1024 * 1024)) as u64; | ||
cfg.raft_store.region_max_size = | ||
get_toml_int(config, "raftstore.region-max-size", Some(80 * 1024 * 1024)) as u64; | ||
get_toml_int(config, "raftstore.region-max-size", Some(128 * 1024 * 1024)) as u64; | ||
|
||
cfg.raft_store.region_check_size_diff = | ||
get_toml_int(config, | ||
"raftstore.region-split-check-diff", | ||
Some(8 * 1024 * 1024)) as u64; | ||
Some(24 * 1024 * 1024)) as u64; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be 16. |
||
|
||
cfg.raft_store.raft_log_gc_tick_interval = | ||
get_toml_int(config, "raftstore.raft-log-gc-tick-interval", Some(10_000)) as u64; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,9 @@ const RAFT_LOG_GC_THRESHOLD: u64 = 50; | |
const RAFT_LOG_GC_COUNT_LIMIT: u64 = REGION_SPLIT_SIZE * 3 / 4 / 1024; | ||
const RAFT_LOG_GC_SIZE_LIMIT: u64 = REGION_SPLIT_SIZE * 3 / 4; | ||
const SPLIT_REGION_CHECK_TICK_INTERVAL: u64 = 10000; | ||
const REGION_SPLIT_SIZE: u64 = 64 * 1024 * 1024; | ||
const REGION_MAX_SIZE: u64 = 80 * 1024 * 1024; | ||
const REGION_CHECK_DIFF: u64 = 8 * 1024 * 1024; | ||
const REGION_SPLIT_SIZE: u64 = 96 * 1024 * 1024; | ||
const REGION_MAX_SIZE: u64 = REGION_SPLIT_SIZE + REGION_SPLIT_SIZE / 3; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't need to be accurate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it will look ugly when change the split size to something else, like 160m, the max size will become 213m in which case. But if using |
||
const REGION_CHECK_DIFF: u64 = REGION_SPLIT_SIZE / 4; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be 8. |
||
const REGION_COMPACT_CHECK_TICK_INTERVAL: u64 = 5 * 60 * 1000; // 5 min | ||
const REGION_COMPACT_DELETE_KEYS_COUNT: u64 = 1_000_000; | ||
const PD_HEARTBEAT_TICK_INTERVAL: u64 = 5000; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
24M
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To reduce scanning times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will delay split scan.